I have very basic knowledge of python and fairly new to pandas, This is my problem description and dataset in csv
I need to turn these two columns into a dictionary with keys having multiple values, and I have to show minimum a maximum values without using built in functions.
So, the output should be something like {Node_a : [64-4], Node_b : [87-4], Node_c : [84-5], Node_d : [54]}, and yes the format of the keys are also changed.
I have reached up to this output: {a: [12,23,64,4], b: [48,87,54,4], c: [5,84], d: [54]} by writing this code.
(data.groupby("node")["value"].apply(list).to_dict())
I am having a tough time retrieving each list of values finding min-max without the function and then further changing the values of the dictionary.
My approach may be long, I don't know, but is there a better way of doing it?