Chandru Lab 3
Chandru Lab 3
LAB ASSIGNMENT-3
SENTIMENTAL ANALYSIS
SUBMITTED
CHANDRU N
(23MBA0001)
SUBMITTED TO
DR. BIJAY PRASAD KUSHWAHA
( PROFESSOR)
Unnamed: Unnamed:
Text Sentiment Timestamp User Platform Hashtags Retweets Likes Country Year M
0.1 0
Enjoying
a
beautiful 2023-01-15 #Nature
0 0 0 Positive User123 Twitter 15.0 30.0 USA 2023
day at 12:30:00 #Park
the park!
...
Traffic
was
terrible 2023-01-15 #Traffic
1 1 1 Negative CommuterX Twitter 5.0 10.0 Canada 2023
this 08:45:00 #Morning
morning.
...
Just
finished
an 2023-01-15 #Fitness
2 2 2 Positive FitnessFan Instagram 20.0 40.0 USA 2023
amazing 15:45:00 #Workout
workout!
...
Excited
about the
2023-01-15
3 3 3 upcoming Positive AdventureX Facebook #Travel 8.0 15.0 UK 2023
weekend 18:20:00 #Adventure
getaway!
...
Trying
out a new
2023-01-15 #Cooking
4 4 4 recipe for Neutral ChefCook Instagram 12.0 25.0 Australia 2023
dinner 19:55:00 #Food
tonight.
...
(732, 15)
Id 0
Text 0
Sentiment 0
Timestamp 0
User 0
Platform 0
Hashtags 0
Retweets 0
Likes 0
Country 0
Year 0
Month 0
Day 0
Hour 0
dtype: int64
#Sentiment Analysis
df['Sentiment'].value_counts().nlargest(10).plot(kind='bar')
plt.title('Top 10 Sentiments based on Text')
plt.xlabel('Sentiment')
plt.ylabel('Count')
plt.show()
Platform
Instagram 258
Twitter 243
Facebook 231
Name: count, dtype: int64
Users often share uplifting information, according to the sentiment analysis, which shows that
positive feelings predominate, followed by neutral and negative attitudes. Instagram is by far the
most popular social media network in this sample, with the most postings (258), followed by
Facebook (231), and Twitter (243). Likes and retweets, on the other hand, indicate varying amounts
of user interaction across platforms. Trending themes and user interests are highlighted by the top
ten hashtags, which may be useful for focused marketing campaigns. These findings are further
supported by a word cloud analysis, which shows that although terms like "traffic," "terrible," and
"frustrating" are frequently associated with negative attitudes, frequently used positive phrases like
"enjoying," "excited," and "amazing" are associated with negative sentiments. Traffic complaints
and everyday hardships account for the bulk of unfavourable opinions, pointing to areas that may
use better. Furthermore, different interaction patterns are shown by an examination of the most
popular platform, highlighting the need of comprehending audience behaviour. Deeper
understanding of how emotions change over time may be possible with a time-based sentiment
analysis, which would assist marketers and companies in modifying their approaches. These results
are extremely pertinent to brand engagement strategies, social media marketing, and consumer
sentiment monitoring, enabling companies to improve user experience and successfully handle
problem areas.