pandas days in month code example
Example 1: month from datetime pandas
#Exctract month and create a dedicated column df["Month"] from a
#column in datetime format df["Date"]
df['Month'] = pd.DatetimeIndex(df['Date']).month
Example 2: convert month weeks days into month days in python pandas
>>> p = pd.Period('2018-2-17')
>>> p.days_in_month
28