I am trying to group the data by month (Created Date) and count the number of tuples for that month using python pandas.

CodePudding user response:
You could use
grouped = df.groupby(df["Created Date"].dt.strftime("%Y-%m")).size()
.dt.strftime allows for formatting the date as text, in this case year-month (%Y is the four digit year, %m the month)
CodePudding user response:
Are you looking for:
df.resample('M', on='Created Date').count()
