I have data frame:
Values Bought
0 0,1,2,3,4,5 0
1 9,10,11,9,11,12,9,11 9,12,11
2 5, 1, 1, 10, 0 0
First qustion:
I need to count how many times each number of "Values" column occured in this data frame.
For example:
0 : 1
1 : 1
2 : 1
3 : 1
4 : 1
5 : 1
9 : 3
10 : 1
11 : 3
12 : 1
Second question:
I need to count how many times each number of every row in "Values" column occured in this row.
For example:
0 : 2
1 : 3
2 : 1
3 : 1
4 : 1
5 : 2
9 : 3
10 : 2
11 : 3
12 : 1
5 : 1
1 : 2
10 : 1
0 : 1
How can I do that?
Values? Are they strings like'0,1,2,3,4,5'or lists of numbers like[0,1,2,3,4,5]?