Section 3: Interacting with HTML and Web APIs

Doubts and Discussion Thread for Section 3: Interacting with HTML and Web APIs !

2 Likes

Project:

Here’s a small project that you could work on:
Convert the data available on Covid19 to a CSV or XLSX format using python.

1 Like

Covid19 data to csv
I have tried above task. There is issue in output
Date columns are randomly arranged based on its occurrence. Can you help me in re-arranging it in ascending order?

could you elaborate the issue?

csvfile -


state ‘AN’ - image
state ‘AP’ - image

In the json file, first state is ‘AN’, under that date starts from 2020-03-26 and ends at 2021-10-31. Same could be seen in the downloaded file ie. from cell B1 to JMC1. In the json file, 2nd state is ‘AP’, date starts from 2020-03-12 and ends at 2021-10-31.
All the date values of state ‘AP’ which were not part of state ‘AN’, shows up after cell JMC1. So to arrange all columns in ascending order of date values, what can be done?

I could arrange columns in ascending order of date values.
Json_to_Csv
Please let me know if this is correct?

Thank you.