Reputation: 501
all,
My input:
logs = pd.DataFrame({'foo':['A','B','C','D'],'bar':[[12,13,14],[10,9,11],[1,2,3],[4,5,6]] })
I trying extract specific element from column where data is list of values.
For example I need extract from column bar
where first row A
, first value 12
in list of [12,13,14]
. And in continue run some loop per all list to extract and assign each element of list in new values and do it over all dataframe.
So my code:
logs.iloc[0:1,1].values[0]
And I expect get 12
, but it doesn't happen
Upvotes: 0
Views: 2281