0

I have value counts '''df["quality"].value_counts()''' 5 681

6 638

7 199

4 53

8 18

3 10

I want to add a new column with my data frame named as taste which is based on quality less than 5 - bad

equal to or less than 7 - normal

greater than 7 - good

Please help me . I'm trying this '''pd.cut(df['quality'], ['good', 'normal', 'bad'], include_lowest=True).value_counts()'''

But it gives me error.

ValueError: could not convert string to float: 'good'

0 Answers0