In terms of lowest computational complexity, how to create a new pandas column which increments by a certain number based on another column

前端 未结 0 1021
时光说笑
时光说笑 2021-01-31 14:11

I have this column of numbers, sorted by value

import pandas as pd 
  
# initialize list of lists 
data = [1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 6, 6, 6]
          


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