I am trying to convert the following dataset which has multiple binary variables into a crosstab. into the following crosstab but i am having no luck emotion blue green red happy 2 2 2 angry 1 2 1 sad 1 1 0 Answer This is matix multiplication: Output:
Tag: crosstab
Problems with Multiindex from pd.Crosstab when appending non present row data
Morning All, Happy Friday. I have some excel output which shows Client, their Sector and the counts of their Result via a crosstab command. This works well: The excel extract meets the requirements. An additional request has come in to add all other possible clients which are not present in the current months…