An open API service indexing awesome lists of open source software.

https://github.com/calcuis/simple-calculation-output-example


https://github.com/calcuis/simple-calculation-output-example

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

### simple calculation and output example
try it out by:
```
py calculator.py
```
### code explanation
- Reading the csv: The `input.csv` file is loaded into a `DataFrame`.
- Grouping and Summing: The `DataFrame` is grouped by `id` and `group`, summing the `min` column.
- Exporting to csv: The grouped data is saved in `output.csv`.
- Exporting to json: The grouped data is restructured into a json format, nested under each id, and saved to `output.json`.

it will produce two files (`output.csv` and `output.json`) as a result; enjoy!