Question: in python can someone help me turn my output below...
In Python, can someone help me turn my output below in a nested dictionary or a possibly dataframe. I basically need to count the items in a list as well. For example
For 0: the number 4 has a count of 1 (4:1) and the number had a count of 1 (2:1)
For 1: 5:1, 2:1, 3:5
Note: It is fine if you don't have my input data. I just need the code and I can apply it to my data