In pandas crosstab, now I am getting the output as below if the other col contains all zero value:
0
0 5
1 2
But I need to get an output for the other column even if it contains all zero.
0 1
0 5 0
1 2 0
I am using below code to create cross tab:
data_crosstab = pd.crosstab(data[df_all.columns[56]],
data[df_all.columns[57]],
margins = False,dropna=False)