I have a dataframe which is called "df" as follows.
My goal is to create a dictionary. The key is gonna be poiid and values are gonna be lng and lat for dictionary.
Example dictionary output
{0: (30.2359091167, -97.7951395833),
1: (30.2691029532, -97.7493953705),
2: (30.2557309927, -97.7633857727),
3: (30.2634181234, -97.7575966669),
4: (30.2742918584, -97.7405226231),
5: (30.261599404, -97.7585805953),
...
My solution;
dictionary = df.groupby('poiid')['lng'].agg(set).to_dict()
my solution works but I couldn't add the 'lat' column into the dictionary.
I am open to see other solutions
