Last active
September 22, 2020 13:54
-
-
Save abhishek-shrm/cd28e8367879db5c1a1393dcda5d7ae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
comment_word_count = [] | |
# Populate the lists with length of comments | |
for i in df_train['cleaned']: | |
comment_word_count.append(len(i.split())) | |
# Create a dataframe with length of comments | |
length_df = pd.DataFrame({'Comment Length':comment_word_count}) | |
# Plotting the histogram | |
length_df.hist(bins = 100, range=(0,500),figsize=(12,8)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment