'>' not supported between instances of 'str' and 'int'

后端 未结 5 1688
忘掉有多难
忘掉有多难 2021-01-13 16:02

I encountered the error

\'>\' not supported between instances of \'str\' and \'int\'

while trying to print the below lines in P

5条回答
  •  清歌不尽
    2021-01-13 16:33

    survey_df_clean['text'] might have NAN or str values in it some where. to find out :

    survey_df_clean['text'].isnull().sum()
    

    if they are,first take care of them then apply

    print (survey_df_clean[survey_df_clean['text']>30].shape)
    

提交回复
热议问题