熊猫数据框日期时间排序返回错误的时间值

时间:2021-06-15 08:42:25

标签: python pandas dataframe timestamp

现在我正在尝试对时间戳 <"Timestamp" column> 进行排序,如下所示

odf['FROMTIME'] = pd.to_datetime(odf['FROMTIME'])
odf['TOTIME'] = pd.to_datetime(odf['TOTIME'])
new_df = odf.sort_values('Timestamp', ascending=True)

enter image description here

它看起来像上面一样。

时间0:51,下次去10:01

原始数据中有1:01、1:02......时间戳

如何对时间戳列进行排序?

感谢阅读。

0 个答案:

没有答案