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