The first code below works and allows me to read my excel file, as a test, I added a new column.
import numpy as np
import pandas as pd
excl = pd.read_excel (r'C:\Users\Family\Desktop\Anaconda\Book1.xlsx')
excl['new_pop'] = (excl.Pop2010 + excl.Pop2020)
print (excl)
Now, I would like to write the older data with the new column to a new excel file. Based on my online web research, I know I need to use the "to_excel" function in Pandas but I can't seem to find an example of how to bring over 'excl' file with the new data.
I previously had State, Country, Pop2010, Date, Pop2020 as columns, I added new_pop as a new column with new information in the cells beneath it.