I need to count the occurrence of entire row in pandas DataFrame
For example if I have the Data Frame:
A = pd.DataFrame([['a','b','c'],['b','a','c'],['a','b','c']])
The expected result should be:
'a','b','c' : 2
'b','a','c' : 1
value_counts
only counts the occurrence of one element in a series (one column)
I can create new column that will have all the element of that row and count values in that column, but I hope for a better solution.