我想从数据框中获取每一行的某个部分的第二高值。我该怎么做呢?
我已经尝试了以下代码,但它不起作用:
df.iloc[:, 5:-3].nlargest(2)(axis=1, level=2)
有没有其他方法可以获得这个?
python pandas
pandas ×1
python ×1