标签: group-by
我的数据集具有以下标题:“日期”,“品牌”,“类型”,“值”
mnc = df.groupby(['date','type'])。sum()
groupby之后,我想将DF分为“钻石”和“黄金”
df1 = mnc [mnc ['type'] =='Diamond']。number.to_numpy()
df2 = mnc [mnc ['type'] =='Gold']。number.to_numpy()
但是,我得到了一个空数组。我哪里做错了?非常感谢!