Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Python program to import the file Tweets.csv into the program, count all of the words per row and add that number into a

Create a Python program to import the file "Tweets.csv" into the program, count all of the words per row and add that number into a new column of the csv file using term frequencyinverse document frequency (TFIDF) or simple word counts .

CSV file is 15 columns and 14,000 rows.

tweet_id airline_sentiment airline_sentiment_confidence negativereason negativereason_confidence airline airline_sentiment_gold name negativereason_gold retweet_count text tweet_coord tweet_created tweet_location user_timezone
570306133677760000 neutral 1 Virgin America cairdin 0 @VirginAmerica What @dhepburn said. 2/24/2015 11:35 Eastern Time (US & Canada)
570301130888122000 positive 0.3486 0 Virgin America jnardino 0 @VirginAmerica plus you've added commercials to the experience... tacky. 2/24/2015 11:15 Pacific Time (US & Canada)
570301083672813000 neutral 0.6837 Virgin America yvonnalynn 0 @VirginAmerica I didn't today... Must mean I need to take another trip! 2/24/2015 11:15 Lets Play Central Time (US & Canada)
570301031407624000 negative 1 Bad Flight 0.7033 Virgin America jnardino 0 @VirginAmerica it's really aggressive to blast obnoxious "entertainment" in your guests' faces & they have little recourse 2/24/2015 11:15 Pacific Time (US & Canada)
570300817074462000 negative 1 Can't Tell 1 Virgin America jnardino 0 @VirginAmerica and it's a really big bad thing about it 2/24/2015 11:14 Pacific Time (US & Canada)
570300767074181000 negative 1 Can't Tell 0.6842 Virgin America jnardino 0 @VirginAmerica seriously would pay $30 a flight for seats that didn't have this playing. it's really the only bad thing about flying VA 2/24/2015 11:14 Pacific Time (US & Canada)
570300616901320000 positive 0.6745 0 Virgin America cjmcginnis 0 @VirginAmerica yes, nearly every time I fly VX this ear worm wont go away :) 2/24/2015 11:13 San Francisco CA Pacific Time (US & Canada)
570300248553349000 neutral 0.634 Virgin America pilot 0 @VirginAmerica Really missed a prime opportunity for Men Without Hats parody, there. https://t.co/mWpG7grEZP 2/24/2015 11:12 Los Angeles Pacific Time (US & Canada)
570299953286942000 positive 0.6559 Virgin America dhepburn 0 @virginamerica Well, I didn'tbut NOW I DO! :-D 2/24/2015 11:11 San Diego Pacific Time (US & Canada)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

Define human resource management.

Answered: 1 week ago