With a pandas dataframe, we can sort the dataframe based on the value of a row
dfObj = dfObj.sort_values(by='b', axis=1, ascending=False)
May we do it based on the absolute value (or more generally, a function) of a row? I expect something like
dfObj = dfObj.sort_values(by=abs('b'), axis=1, ascending=False)
If it can't work, how can we produce a row equivalent to the absolute value of row 'b' and then sort?
Thanks!!