I want to add codesin dataframe dictionary.
codes = [['01', '02', '03', '05', '06', '08', '10', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31', '33', '35', '37', '39', '43', '45', '4.55', '48', '52']
df = pd.read_excel(sales,sheet_name=None,ignore_index = True, skiprows=7)
for i in codes:
for key in df.keys():
df['Sheet1']['Code'] = i
I cannot understand why I seem to have idata in every frame. I think I understand why I cannot figure out how to fix this.
I am new to coding and I generally cannot find a solution.
Expected Result:
df['Sheet1']
Date Particulars Inwards Code
1 2017-04-01 EFG 12800 01
2 2017-07-22 ABC 100 01
3 2017-09-05 BCD 10000 01
4 2018-03-13 ABC 2000 01
ColumnCodeshould be 02in the next data frame and so on.
After that, I want concatdata and data group_by, and then write to excel.
TIA