阅读背景:

如何基于另一列的值在pandas dataframe列中创建新值

来源:互联网 

I have a pandas dataframe of values I read in from a csv file. I have a column labeled 'SleepQuality' and the values are float from 0.0 - 100.0. I want to create a new column labeled 'SleepQualityGroup' where values from the original column btw 0 - 49 have a value of 0 in the new column, 50 - 59 = 1 , 60 - 69 = 2, 70 - 79 = 3, 80 - 89 = 4, and 90 - 100 = 5I have a pandas dataframe of values I read in f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: