Analyzing a dataframe based on multiple conditions
问题 names Class Category label ram A Red one ravi A Red two gopal B Green three Sri C Red four my_list1=["Category"] my_list2=["Class"] I need to get the combination counts between these two columns. I am trying to get the combination of some selected columns. my_list2 even have more than one. I tried, df[mylist1].value_counts() It is working fine for a sinigle column. But I want to do for multiple column in my_list2 based on my_list1 My desired output should be, output_df, Value Counts Red.A 2