I encountered the error
\'>\' not supported between instances of \'str\' and \'int\'
while trying to print the below lines in P
survey_df_clean['text'] might have NAN or str values in it some where. to find out :
survey_df_clean['text']
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)