I\'m trying to create a dictionary of lists based on a pandas dataframe, I need a dictionary of lists to pass for my Plotly dashboard
In: df.head() Model
You can groupby, aggregate to lists, return a rec.array with to_records and construct a dictionary from the result:
rec.array
dict(df.groupby('Model').agg(list).to_records()) # {'Ford': ['F-150', 'Escape', 'Mustang'], 'Jeep': ['Grand Cherokee', 'Wrangler']}