📜  pandas datetime 仅显示日期 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:16.885000             🧑  作者: Mango

代码示例1
# Changing object type column to datetime
df['date_col'] = pd.to_datetime(df.date_col)

# Creating new column with just the date
df['new_date_col'] = df['date_col'].dt.date