-
-
Save amankharwal/15fd7c65b988336a8ff92e8687d490fc 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
train['Number of Words'] = train['ABSTRACT'].apply(lambda x: len(str(x).split())) | |
test['Number of Words'] = test['ABSTRACT'].apply(lambda x: len(str(x).split())) | |
fig = make_subplots(rows = 1, cols = 2) | |
trace1 = go.Histogram(x = train['Number of Words']) | |
fig.add_trace(trace1, row = 1, col = 1) | |
trace2 = go.Box(y = train['Number of Words']) | |
fig.add_trace(trace2, row = 1, col = 2) | |
fig.update_layout(showlegend = False) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment