from pandas import DataFrame as df
import pandas as pd
lics = pd.read_csv("/Users/Mah/Temp/csvdb/license-union-norownum.csv")
licsgr = lics.groupby('gem')['license'].apply(list)
licsgr.columns = ['gem', 'licenses']
# But how do we convert Series to DataFrame in Pandas?