Question: df_high = df_all[['model_cd', 'modelname', 'installcost','yearlyupkeep', 'Efficiency']][df_all['Efficiency']==High] high_efficiency_model = df_high[['model_cd', 'modelname','installcost', 'yearlyupkeep','Efficiency']].groupby('Efficiency') high_efficiency_model.to_csv(index = True) keep getting an error saying : AttributeError: 'DataFrameGroupBy' object has no
df_high = df_all[['model_cd', 'modelname', 'installcost','yearlyupkeep', 'Efficiency']][df_all['Efficiency']=="High"]
high_efficiency_model = df_high[['model_cd', 'modelname','installcost', 'yearlyupkeep','Efficiency']].groupby('Efficiency')
high_efficiency_model.to_csv(index = True)
keep getting an error saying :
AttributeError: 'DataFrameGroupBy' object has no attribute'to_csv'
How to fix
Step by Step Solution
3.34 Rating (157 Votes )
There are 3 Steps involved in it
It looks like you are trying to use the tocsv method on a DataFrameGroupBy ob... View full answer
Get step-by-step solutions from verified subject matter experts
