I am trying to loop over a dataframe like the following:
for row, index in split[0].iterrows():
kitname = row['kit_name'][0]
print(kitname)
where split is a list of dataframes
split[0] :
kit_name kit_info part_name part_number
0 KIT0001 Standard FLC Kit Standard FLC Kit 0
1 KIT0001 Standard FLC Kit Standard FLC Kit 0
2 KIT0001 Standard FLC Kit Standard FLC Kit 0
but the following error is coming:
TypeError: 'int' object is not subscriptable
I am using the same code in a different script and it's working fine there
print(row['kit_name"], row['kit_name"])to find the problem. You need to know how to find a look for a problem by yourself, if not you'll take so much time to develop your thing