I am using the current code to source coronavirus cases and sort into 1 excel workbook with 2 sheets. The code runs without error, but I have no idea where it is? Where would I put my location within my files to get the workbook added to a certain file?
For example, I want the file to be dropped into the file DocumentsCoronavirus.
import pandas as pd
url_cases = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv'
url_deaths = 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv'
df_cases = pd.read_csv(url_cases)
df_deaths = pd.read_csv(url_deaths)
writer = pd.ExcelWriter('Daily Coronavirus Data.xlsx', engine='xlsxwriter')
df_cases.to_excel(writer, sheet_name='Sheet1')
df_deaths.to_excel(writer, sheet_name='Sheet1')
writer.save()
Many thanks in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…