I have a list (ie my_list) of 10000 elements. Each element is a dataframe that has 4 columns (namely: id, eventTime, name, value). I would like to iterate through the list of dataframes and find for every dataframe the amount of 'eventTime' per day. This is what I have so far.
values_per_day = []
for aa in my_list:
find_values = my_list.eventTime.unique()
values_per_day.append(find_values)
The error is:
AttributeError: 'list' object has no attribute 'eventTime'
您想使用变量aa
而不是my_list
:
find_values = aa.eventTime.unique()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.