示例#1
0
def main(args: Optional[List[Any]] = None) -> None:
    """Run the `pandas_profiling` package.

    Args:
      args: Arguments for the programme (Default value=None).
    """

    # Parse the arguments
    parsed_args = parse_args(args)
    kwargs = vars(parsed_args)

    input_file = Path(kwargs.pop("input_file"))
    output_file = kwargs.pop("output_file")
    if output_file is None:
        output_file = str(input_file.with_suffix(".html"))

    silent = kwargs.pop("silent")

    # read the DataFrame
    df = read_pandas(input_file)

    # Generate the profiling report
    p = ProfileReport(
        df,
        **kwargs,
    )
    p.to_file(Path(output_file), silent=silent)
示例#2
0
def main(args=None) -> None:
    """ Run the `pandas_profiling` package.

    Args:
      args: Arguments for the programme (Default value=None).
    """

    # Parse the arguments
    args = parse_args(args)
    config.set_args(args, dots=True)

    # read the DataFrame
    df = read_pandas(Path(args.input_file))

    # Generate the profiling report
    p = ProfileReport(df, minimal=args.minimal, config_file=args.config_file)
    p.to_file(output_file=Path(args.output_file), silent=args.silent)
示例#3
0
def profile_report(df, **kwargs) -> ProfileReport:
    """Profile a DataFrame.

    Args:
        df: The DataFrame to profile.
        **kwargs: Optional arguments for the ProfileReport object.

    Returns:
        A ProfileReport of the DataFrame.
    """
    p = ProfileReport(df, **kwargs)
    return p