Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1 = df.loc[df['Recommended IND'] == 1, 'polarity']
- x0 = df.loc[df['Recommended IND'] == 0, 'polarity']
- trace1 = go.Histogram(
- x=x0, name='Not recommended',
- opacity=0.75
- )
- trace2 = go.Histogram(
- x=x1, name = 'Recommended',
- opacity=0.75
- )
- data = [trace1, trace2]
- layout = go.Layout(barmode='overlay', title='Distribution of Sentiment polarity of reviews based on Recommendation')
- fig = go.Figure(data=data, layout=layout)
- iplot(fig, filename='overlaid histogram')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement