Based on python, sort descending dataframe with pandas:
Given:
from pandas import DataFrame import pandas as pd d = {\'x\':[2,3,1,4,5], \'y\':[
df.iloc[(df.x ** 2 + df.y **2).sort_values().index]
after How to sort pandas dataframe by custom order on string index