I have been trying to achieve something like this: Example
So far this is what I have tried:
crimes.Month = pd.to_datetime(crimes.Month, format='%Y/%m')
crimes.index = pd.DatetimeIndex(crimes.Month)
import numpy as np
crimes_count_date = crimes.pivot_table('Month', aggfunc=np.size,columns='Crime type', index=crimes.index.date, fill_value=0)
crimes_count_date.index = pd.DatetimeIndex(crimes_count_date.index)
plo = crimes_count_date.rolling(365).sum().plot(figsize=(12, 30),subplots=True, layout=(-1, 3), sharex=False, sharey=False)
Note- on the x-axis I would like to display each year/month: 2017/08
Current output below, is not showing all months/year or any lines for the crime types Current Ouput