Pandas 在熊猫系列中循环,以分钟为单位返回日期

Pandas 在熊猫系列中循环,以分钟为单位返回日期,pandas,series,Pandas,Series,我有一个熊猫系列,看起来像: 505 00:12:00 325 00:10:00 2929 00:09:00 261 00:08:00 我想以[12,10,09,08]的形式将日期作为数组返回。我该怎么做呢 试试看 l = pd.to_datetime(df.time, format = '%H:%M:%S').dt.minute.tolist() [12, 10, 9, 8]

我有一个熊猫系列,看起来像:

505     00:12:00
325     00:10:00
2929    00:09:00
261     00:08:00
我想以[12,10,09,08]的形式将日期作为数组返回。我该怎么做呢

试试看

l = pd.to_datetime(df.time, format = '%H:%M:%S').dt.minute.tolist()

[12, 10, 9, 8]