Alternative to apply function in pandas

前端 未结 0 1474
误落风尘
误落风尘 2021-02-11 11:24

I would like to execute this simple transformation in a more efficiente way.

df[\'amount\'] = df.apply(lambda row: 500 if row.amount > 500 else row.amount, axi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题