0

I would like create a pivot table / Burt table for ACM model. But, i didn't create the table with sum row and sum columns.

This my input :

And my output :

enter image description here

data = np.array([['Taille++', 'Veloc++', 'Affec+'],
['Taille-', 'Veloc-', 'Affec-'],
['Taille++', 'Veloc++', 'Affec+'],
['Taille+', 'Veloc+', 'Affec+'],
['Taille-', 'Veloc-', 'Affec+'],
['Taille++', 'Veloc-', 'Affec-'],
['Taille-', 'Veloc+', 'Affec+'],
['Taille+', 'Veloc+', 'Affec+']], dtype=object)

columns = ['Chien','Velocite', 'Affection']

df = pd.DataFrame(data,columns=columns)

Do you have an idea ?

Thanks you !!

Flo Cp
  • 281
  • 2
  • 13

0 Answers0