Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
df['reading_time']=df['reviews.text'].apply(lambda x: textstat.reading_time(x))
print('Reading Time of upvoted reviews=>',df[df['reviews.numHelpful']>1]['reading_time'].mean())
print('Reading Time of not upvoted reviews=>',df[df['reviews.numHelpful']<=1]['reading_time'].mean())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment