Below is an example of my dataframe and a dictionary of what I'm looking to compute from it. My current method involves looping through unique ColA values, create a subset dataframe, getting list of ColB values, and make a dict from that. Problem is I have over a million unique ColA values to loop through. Any ideas??
DF
 ColA       ColB
 mike        34
 mike         3
 mike        10
 bill        80
 dean         2
 dean         4
 dean        44
 dean        56
desired dictionary = {'mike':[34,3,10], 'bill': [10], 'dean': [2,4,44,56]}
Any ideas? Thanks!!