Visualize the distribution of sentiment values

PHOTO EMBED

Wed Jun 19 2024 14:53:13 GMT+0000 (Coordinated Universal Time)

Saved by @EbadulHaque #python

# Visualize the distribution of sentiment values
import matplotlib.pyplot as plt
import seaborn as sns

# Set the style of the visualization
sns.set(style='whitegrid')

# Create a histogram of the sentiment values
plt.figure(figsize=(10, 6))
sns.histplot(df['sentiment'], bins=30, kde=True, color='blue')
plt.title('Distribution of Sentiment Values')
plt.xlabel('Sentiment')
plt.ylabel('Frequency')
plt.show()
content_copyCOPY

Create a histogram of the sentiment values