-
Notifications
You must be signed in to change notification settings - Fork 9
Working with data: csv and dataframe #28
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
Conversation
JavierBravoDonaire
commented
Sep 27, 2021
- Zip with the json file was extracted in the same folder (data).
- New folder that holds inside the code added.
- Code (data.py) that converts the json file to dataframe, and creates a new file csv in the data folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see both conversions as correct.
|
||
""" DATAFRAME TO CSV """ | ||
|
||
df.to_csv('../data/device-covid19serology-0001-of-0001.csv', index = None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to convert the data to CSV? Probably the dataframes are better to query the data in order to get insights!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we have the data in CSV format, it is very easy to import it into SQL and design the queries to obtain information. On the other hand, having the data in dataframe makes it easier to design visualisations (graphs) to show on the website. That's why I think it's quite appropriate to have the data accessible in these two ways.
Added pyhton file that converts json to dataframe and csv