I want to sort by name length. There doesn't appear to be a key
parameter for sort_values
so I'm not sure how to accomplish this. Here is a test df:
import pandas as pd
df = pd.DataFrame({'name': ['Steve', 'Al', 'Markus', 'Greg'], 'score': [2, 4, 2, 3]})
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…