![](/img/trans.png)
[英]how to subset dataframe from first row to the highest value in a column?
[英]how can I transform this three column dataframe to a one column with the value of the column in the highest value in a row
idxmax
是您要找的
df["max"] = df.idxmax(axis=1)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.