-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Milestone
Description
>>> pd.Timestamp('2014-06')
Timestamp('2014-06-01 00:00:00')
>>> pd.Timestamp('06-2014')
Timestamp('2014-06-09 00:00:00')
When parsing a string "YYYY-MM", the day defaults to the 1st of the month (the behavior I would expect, consistent with defaulting hour minute and second to 0), while "MM-YYYY" defaults the day to today's day. If the string format is specified manually as in pd.to_datetime('06-2014',format='%m-%Y')
, the day consistently defaults to the first of the month.