I have following code:
import seaborn as sns import pandas as pd import os sns.set_theme(style="whitegrid") df = pd.read_csv("C:/tmp/all.csv") sns.boxplot(x="cluster", y="val", hue="type", palette=["m", "g"], data=df) sns.despine(offset=10, trim=True) My CSV is:
index, cluster, type, val 1, 0-10, male, 1 2, 30-40, female, 5 3, 30-40, male, 3 4, 50-60, male, 7 5, 50-60, female, 1 ... The max value of val is 10.
My output is:
But what I want is: o boxplot of values in a grouped way. In my output I'm getting the number of counts for each cluster. The maximum val is actually 10. What am I doing wrong?

df.tail()to verify that the dataframe really is as described?