pandapower icon indicating copy to clipboard operation
pandapower copied to clipboard

[feature] timeseries: Enable saving of compressed CSV files

Open jokabrink opened this issue 1 year ago • 2 comments

When setting up the OutputWriter() object, passing output_file_type=".csv.zip" should not result in a warning or error, but instead tell Pandas to save the data using the inferred compression format. This is possible because the documentation in https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html allows for inferred compression types from file name.

jokabrink avatar Jan 18 '24 17:01 jokabrink

Thank you @jokabrink this is a nice feature!

Please add a minimal test for this feature in pandapower/test/timeseries/test_output_writer.py and mention the change in the CHANGELOG file.

rbolgaryn avatar Mar 26 '24 10:03 rbolgaryn

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.43%. Comparing base (f2794c6) to head (ca9e3cc). Report is 115 commits behind head on develop.

:exclamation: Current head ca9e3cc differs from pull request most recent head 2afbe2f

Please upload reports for the commit 2afbe2f to get more accurate results.

Files Patch % Lines
pandapower/timeseries/output_writer.py 50.00% 2 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #2209       +/-   ##
============================================
+ Coverage    62.30%   79.43%   +17.13%     
============================================
  Files          255      255               
  Lines        28062    27953      -109     
============================================
+ Hits         17483    22205     +4722     
+ Misses       10579     5748     -4831     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 26 '24 10:03 codecov[bot]