Hi everyone, I found the example below online that creates an excel file for you. I am currently working with a workbook in Python (using read_excel function), I added columns to it and edited some of the data. How would I export the new information to excel? Where would I add that to the code below?
Pop2010, Date and Pop2020.
excl = pd.DataFrame([['a', 'b'], ['c', 'd']], index=['row 1', 'row 2'], columns=['col 1', 'col 2']) excl.to_excel("output.xlsx")This is the code I used to rad the excel file:
excl = pd.read_excel (r'C:\Users\Family\Desktop\Anaconda\Book1.xlsx')and the column names - State, Country
Pop2010, Date and Pop2020.