convert month and day to weeks python code example Example: convert month weeks days into month days in python pandas >>> p = pd.Period('2018-2-17') >>> p.days_in_month 28