text_html_output_1.png
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

train_df = pd.read_csv('/kaggle/input/commonlitreadabilityprize/train.csv')
train_df.drop(train_df[(train_df.target == 0) & (train_df.standard_error == 0)].index, inplace=True)
train_df.reset_index(drop=True, inplace=True)
test_df = pd.read_csv('/kaggle/input/commonlitreadabilityprize/test.csv')
submission_df = pd.read_csv('/kaggle/input/commonlitreadabilityprize/sample_submission.csv')

target_mean = train_df['target'].mean()
target_median = train_df['target'].median()
target_std = train_df['target'].std()
target_min = train_df['target'].min()
target_25 = np.percentile(train_df['target'], 25)
target_50 = np.percentile(train_df['target'], 50)
target_75 = np.percentile(train_df['target'], 75)
target_max = train_df['target'].max()
target_skew = train_df['target'].skew(axis=0, skipna=True)

standard_error_mean = train_df['standard_error'].mean()
standard_error_median = train_df['standard_error'].median()
standard_error_std = train_df['standard_error'].std()
standard_error_min = train_df['standard_error'].min()
standard_error_25 = np.percentile(train_df['standard_error'], 25)
standard_error_50 = np.percentile(train_df['standard_error'], 50)
standard_error_75 = np.percentile(train_df['standard_error'], 75)
standard_error_max = train_df['standard_error'].max()
standard_error_skew = train_df['target'].skew(axis=0, skipna=True)

text = train_df.excerpt[0]
wordcloud = WordCloud().generate(text)
wordcloud = WordCloud(max_font_size=50, max_words=100, background_color='white').generate(text)
wordcloud.generate(' '.join(train_df['excerpt_preprocessed']))
plt.figure()
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.show()