Pandas once condition is met in column delete n rows

前端 未结 0 1823
悲&欢浪女
悲&欢浪女 2020-11-28 08:06

I have a DataFrame that looks like df = pd.DataFrame({\'col1\': [.8,.9,1,1,1,.9,1,.9,.8,.7,.6,.5,.4,.3]}).

The goal I have is once a number 1 in \'col1\'

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