pd.cut returns a column of NaNs

前端 未结 0 669
無奈伤痛
無奈伤痛 2021-01-26 08:56

I wrote following code, but return all NaNs in the new column.

bins = [0, 1, 2, 5]
cat = [\'zero\', \'one\', \'two and more\']
df[\'group\'] = pd.cut(df[\'count\'         


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