【发布时间】:2021-04-01 10:40:25
【问题描述】:
data = df['time_position']
time_position #input data
01:22:00
00:22:00
00:00:01
02:22:00
03:22:00
00:22:00
dtype: object
如何将对象时间更改为 'str' ?
我希望将对象更改为 str ,然后使用以下命令将其更改为列表:
df['time_position'].tolist()
谢谢!提前
【问题讨论】:
-
str在 pandas 中的类型也存储为object类型。
标签: python pandas string date time