Home > Blockchain >  How to change the order of columns and plot images side by side with seaborn in Python?
How to change the order of columns and plot images side by side with seaborn in Python?

Time:12-08

I have a dataset contains the answers from a multiple-choice test. The test includes 24 exam codes, each exam code has 50 key answers(A,B,C,D for 50 questions). Below is a corner of it, you can access the whole thing with the link I put at the end.

enter image description here

I want to count the number of each answer (ABCD) in each exam code. Here I plotted 2 exam codes like this:

enter image description here

How can I plot them side by side and change the order of answers in Python? I want the order of columns is "ABCD". (I've tried using plt.subplot, sns.factorplot but I keep getting errors).

Thank you.

Data link: sns.catplot from melted dataframe

  • Related