📅  最后修改于: 2022-03-11 14:57:45.401000             🧑  作者: Mango
f = pd.DataFrame({"value": [2, 3, 1], "date": ["2019-3-18", "2019-10-24", "2019-1-1"]})
df["date"] = pd.to_datetime(df["date"])
df = df.sort_values(by="date")