我使用以下语法创建了一个按不同字段分组的数据框:
rent_df=rent_df.groupby(["Garage Included","Pool", "Elevator","Ext/Int","Rooms_binned","Lot_binned"]).agg({'Price': ['sum'],'Lot Size': ['sum'],'Lot_binned': ['count']})
rent_df["Price/Sqm"]=rent_df["Price"]/rent_df["Lot Size"]
输出为以下DataFrame
如何过滤以访问价格/平方米,手数计数,手数/总和等...