Reputation: 99
I would like to create two boxplots to visualize different attributes within my data by splitting the attributes up based on their scale. I currently have this
sns.boxplot(data=df)
box plot with all attributes included
I would like it to be like the images below with the attributes in different box plots based on their scale but with the attribute labels below each boxplot (not the current integers).
sns.boxplot(data=[df['mi'],df['steps'],df['Standing time'],df['lying time']])
Upvotes: 1
Views: 3133
Reputation: 49022
You can subset a pandas DataFrame by indexing with a list of column names
sns.boxplot(data=df[['mi', 'steps', 'Standing time', 'lying time']])
Upvotes: 2