小编Mat*_* P.的帖子

如何在熊猫中保持最快的骑行

我有一个这样的数据框:

 df = pd.DataFrame({'origin': ['town a', 'town a', 'town a','town a', 'town c', 'town c'],\
'destination': ['town b', 'town b', 'town b','town b','town b','town b'], \
'departure_hour': ['09:30', '09:45','10:00', '10:30','14:30', '15:30'],\
'arrival_hour': ['11:30', '10:50','12:00', '11:45','16:30', '19:30'],\
'date': ['29-09-2020', '29-09-2020','29-09-2020','29-09-2020','29-09-2020','29-09-2020']})

   origin destination departure_hour arrival_hour        date
0  town a      town b          09:30        11:30  29-09-2020
1  town a      town b          09:45        10:50  29-09-2020
2  town a      town b          10:00        12:00  29-09-2020
3  town a      town b          10:30        11:45  29-09-2020
4  town c      town …
Run Code Online (Sandbox Code Playgroud)

python performance dataframe python-3.x pandas

6
推荐指数
1
解决办法
63
查看次数

标签 统计

dataframe ×1

pandas ×1

performance ×1

python ×1

python-3.x ×1