My csv File sample :
'Date','Category','Ability'
'21,2,5','Sparrow','Air,land'
'4,5,6','Eagle','Air,Land'
My current code:
with open(Filepath,'r') as f :
user_read=csv.reader(f)
dict_date=[line['Date'] for line in user_read]
print(dict_date)
Error :
TypeError : list indices must be integer or slices,not str
My expected Output :
[21,2,5,4,5,6]
Any ideas.. So my Category and Ability has seperate Dictionary