0

How can I extract temperature record of Indian cities on a specific day (say Feb 20, 2022) using web scrapping techniques in Python? Let’s consider the cities are Noida, New Delhi, Gurgaon, Chennai etc. Suppose we have a list of 200 Indian cities and I want to extract hourwise temperature of all these cities on February 20,2022 and want to save it in .csv file. The saved file should contain the following information: cities, 00:00:00, 01:00:00, 02:00:00, ........, 22:00:00, 23:00:00 New Delhi, 18, 18,19,.....,14, 15

Here, New Delhi is a cityname and 18, 18, 19 are temperatures in degree celsius at time 00:00:00, 01:00:00, 02:00:00 respectively. I want to save all records in comma separated values (csv) suppose I enter the city name in list, then my input would be:

Input: cities= ['New Delhi', 'Gurgaon', 'Noida', 'Chennai']

Suppose we want the temperature of cities in degree Celsius on February 20, 2022, then output should be in csv format as following:

output:

cities,00,01,02,03,04,05,06,07,08,09,........,21,22,23   
New Delhi, 18,18,19,19,19,20,20,20,20,21,.....,15,14,15

Gurgaon, 18,17,17,17,19,19,20,20,19, .......,17,14,13

Noida,17,17,17,17,16,16,17,17,16,.......,16,15,12

chennai, 19,19,19,20,20,20,20,21,21,.....,22,22,21
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 27 '22 at 14:45
  • I want to extract temperature record of Indian cities on a specific day (say Feb 20, 2022). Let’s consider the cities are Noida, New Delhi, Gurgaon, Chennai etc. Suppose we have a list of 200 cities and I want to extract the hourwise temperature of all these cities on February 20,2022 and want to save it in .csv file. The saved file should contain the following information: cities, 00:00:00, 01:00:00, 02:00:00, ........, 22:00:00, 23:00:00 New Delhi, 18, 18,19,.....,14, 15 – anonymous_abhi Apr 28 '22 at 11:24
  • Do you have a table with the temperatures in? – Emi OB Apr 28 '22 at 11:25
  • Here, New Delhi is a cityname and 18, 18, 19 are temperatures in degree celsius at time 00:00:00, 01:00:00, 02:00:00 respectively. I want to save all records in comma separated values (csv) suppose I enter the city name in list, then my input would be: cities= [‘New Delhi’, ‘Gurgaon’, ‘Noida’, ‘Chennai’] output: cities,00:00:00, 01:00:00, 02:00:00, 03:00:00, .. .. .. , 22:00:00 New Delhi, 18, 18, 19, .. .. .. , 14, 15 Gurgaon, 18,17,17, .. .. .. ,14, 13 Hope it would be helpful for you in understanding.. – anonymous_abhi Apr 28 '22 at 11:25
  • Please edit your question with these, you can format it better – Emi OB Apr 28 '22 at 11:39
  • @EmiOB I don't have any temperature information related table. I need to scrape these information from web using web scrapping techniques based on entered cities. – anonymous_abhi Apr 28 '22 at 12:28
  • What have you already tried to get the data from a website and put it into the CSV? This is not a coding service. – ivvija Apr 28 '22 at 12:36

0 Answers0