px.line(df,
x='created_at',
y='ad_type',
color='ad_type')
by_month = pd.to_datetime(df['created_at']).dt.to_period('M').value_counts().sort_index()
by_month.index = pd.PeriodIndex(by_month.index)
df_month = by_month.rename_axis('month').reset_index(name='counts')
df_month
import plotly.graph_objs as go
fig = go.Figure(data=go.Scatter(x=df_month['month'].astype(dtype=str),
y=df_month['counts'],
marker_color='indianred', text="counts"))
fig.show()