📜  按数据分组 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:35.306000             🧑  作者: Mango

代码示例1
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
dd=pd.melt(df,id_vars=['Group'],value_vars=['Apple','Orange'],var_name='fruits')
sns.boxplot(x='Group',y='value',data=dd,hue='fruits')