Esempio n. 1
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(args.input_file)

    # Generate the profiling report
    p = df.profile_report()
    p.to_file(output_file=args.output_file, silent=args.silent)
Esempio n. 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 = pd.read_csv(str(args.input_file))

    # Generate the profiling report
    p = df.profile_report()
    p.to_file(output_file=args.output_file)

    # Open a webbrowser tab if requested
    if not args.silent:
        import webbrowser

        webbrowser.open_new_tab(p.file.name)
Esempio n. 3
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)
    if args.output_file is None:
        args.output_file = str(Path(args.input_file).with_suffix(".html"))
    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,
        explorative=args.explorative,
        config_file=args.config_file,
    )
    p.to_file(Path(args.output_file), silent=args.silent)