How to sort a newly created DF"pd.DataFrame()..sort_values()"

Viewed 30

Now when I want to sort a df, I usually use:-

data.sort_values("Name", axis = 0, ascending = True,
             inplace = True, na_position ='last')

where "Name" is a column that I use to assign the argument 'by='. but now I want to sort a newly created df like this:-

FeatureImportances=pd.DataFrame(Tclf.feature_importances_,index=Name_features).sort_values(by='',axis = 0, ascending = False)

what to assign for the argument 'by=' here.

0 Answers
Related