Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing profile report to an I/O stream #665

Open
dhimmel opened this issue Jan 8, 2021 · 0 comments
Open

Writing profile report to an I/O stream #665

dhimmel opened this issue Jan 8, 2021 · 0 comments

Comments

@dhimmel
Copy link

dhimmel commented Jan 8, 2021

ProfileReport.to_file allows writing to a local path, specified as a str or pahtlib.Path:

https://github.com/pandas-profiling/pandas-profiling/blob/d4e70185fa7e16b1d0b07dfb731897ef06bb3067/src/pandas_profiling/profile_report.py#L254-L262

I'd like to write an HTML report to an I/O stream (i.e. typing.IO). The motivation is to write directly to a remote filesystem opened via fsspec. It also would help users create compressed reports.

Is there a better way currently than writing to a temp file and then copying that?

It's hard for to_file API to support this feature request since it infers format from path extension. So maybe another method like to_file_stream or a format option for to_file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant