How to order a python dataframe by adding the row values?
#create data
DF=pd.DataFrame(columns=["M1", "M2", "M3", "M4"])
DF.loc[0]=[45, 46, 54 , 57]
DF.loc[1]=[32 ,36 ,29 ,56]
DF.loc[2]=[56,44 ,40 ,55]
DF.loc[3]=[57 ,43 ,42 ,54]
DF=DF.astype(int)

#main function

DF["sum_"]=DF.apply(lambda x: sum(x), axis=1)
DF.sort_values("sum_", ascending=False)