CSS-Electronics / api-examples

CANedge API Examples for MDF4/S3
MIT License
103 stars 35 forks source link

Random (?) call ".to_csv" in method restructure_data() #5

Closed sorenmik closed 3 years ago

sorenmik commented 3 years ago

https://github.com/CSS-Electronics/api-examples/blob/e5cd85ec05b328c619fed85985f068c2da3a02ce/examples/data-processing/utils.py#L92

It seems kinda out of place that the method "restructure_data()" outputs a .csv file.

In the example "process_data.py", there is a specific call to .to_csv() after restructure_data(), resulting in a write and then an overwrite of the .csv file:

"process_data.py": df_phys_join = restructure_data(df_phys=df_phys_all, res="1S") ### Writes .csv file df_phys_join.to_csv("output_joined.csv") ### Overwrites the above csv file

Same issue in repo "dashboard-writer"

MatinF commented 3 years ago

You're right, thanks again for the report - it should be updated now

sorenmik commented 3 years ago

No problem - thank you for all the great tools.