pandas.to_datetime () [Reserved only year - month - date]

Outline

pandas.to_datetime () minutes to generate a default date [2019-07-03 00:00:00] with accuracy; and
sometimes these do not require minute precision;

Remove min Accuracy

Min can be removed by the pandas .dt.date.

df['just_date'] = df['dates'].dt.date

( Padnas version greater than or equal to 0.15.0 )

Guess you like

Origin www.cnblogs.com/bigtreei/p/11126805.html