period = pd.Period('2017-1') period.to_timestamp()
timestamp = pd.Timestamp('2017-1-24') timestamp.to_period('M')