In [23]:
from os import getcwd
from pathlib import Path
src_path = (Path(getcwd()) / '..' / 'data' / 'wrangled' / 'combined.csv').resolve()

In [31]:
import pandas as pd

In [33]:
df = pd.read_csv(src_path, dtype=object)

Licenses by year


In [44]:
pd.pivot_table(df, index=['Lic Type'], columns=['yearmonth'], aggfunc=len, values='year')


Out[44]:
yearmonth 2013-01 2014-01 2015-01 2016-01
Lic Type
01 51257 54343 55521 55929
02 7480 7884 8148 8145
06 2061 2415 2569 2543
07 7811 9302 10076 10510
08 858 1031 1129 1148
09 51 58 65 66
10 264 273 300 318
11 175 186 203 216

In [ ]: