0
我有一個熊貓dataFrame
,其中datetime64[ns]
爲索引。由於數據精度爲微秒級,我想將這個日期複製到另一個dataFrame
,具有二級或分級精度,這樣我就可以輕鬆繪製/可視化它。任何想法如何做到這一點?也可以這樣做,而不需要將數據複製到另一個dataFrame
?pandas dataFrame以datetime64 [ns]作爲索引,精度爲微秒
Name Fruit
2016-11-03 21:20:15.555222 John Apple
2016-11-03 21:20:15.555266 John Kiwi
2016-11-03 21:20:15.555292 Mary Apple
2016-11-03 21:20:16.595222 Peter Apple
2016-11-03 21:20:16.599222 Peter Orange
2016-11-03 21:20:16.655222 John Apple
2016-11-03 21:20:17.659222 John Apple
2016-11-03 21:20:17.660222 John Apple
After the Change i wan't :
Name Fruit
2016-11-03 21:20:15.555222 John Apple
2016-11-03 21:20:16.595222 Peter Apple
2016-11-03 21:20:17.659222 John Apple
謝謝。有用。 – Sun