Skip to content

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

Merged
merged 7 commits into from
Sep 27, 2021

Conversation

JavierBravoDonaire
Copy link
Contributor

  • 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.

Copy link
Contributor

@oscarescuderoarnanz oscarescuderoarnanz left a 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.

@oscarescuderoarnanz oscarescuderoarnanz merged commit 980ac0f into aylabs:main Sep 27, 2021

""" DATAFRAME TO CSV """

df.to_csv('../data/device-covid19serology-0001-of-0001.csv', index = None)
Copy link
Contributor

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!

Copy link
Contributor

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.

ExZylan pushed a commit to ExZylan/devops that referenced this pull request Sep 29, 2021
Added pyhton file that converts json to dataframe and csv
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

Successfully merging this pull request may close these issues.

3 participants