import pandas as pd
date=pd.date_range('2010/1/1','2010/12/31', freq='D')
week=[int(i.strftime("%w")) for i in date] # 0表示星期日
dataframe = pd.DataFrame({'date':date,'week':week})
dataframe.to_excel('date000.xlsx',index=False)
import pandas as pd
date=pd.date_range('2010/1/1','2010/12/31', freq='D')
week=[int(i.strftime("%w")) for i in date] # 0表示星期日
dataframe = pd.DataFrame({'date':date,'week':week})
dataframe.to_excel('date000.xlsx',index=False)