12 Chapter 13, Data Mining Twitter
df = pd.DataFrame(tweets)
df = df.dropna()
d. All of the above statements are true.
13.15.2 Class LocationListener
No questions.
13.16 Ways to Store Tweets
13.16 Q1: Which of the following statements is false? For analysis, you’ll com-
monly store tweets in:
a. CSV files.
b. pandas DataFrames in memory—CSV files can be loaded easily into Data-
Frames for cleaning and manipulation.
c. SQL databases—Such as MySQL, a free and open source relational database
management system (RDBMS).
d. NoSQL databases—Twitter returns tweets as XML documents, so the natural
way to store them is in a NoSQL XML document database, such as MongoDB.
Tweepy generally hides the XML from the developer, but you can manipulate it
directly, if you wish, using the PyMongo library.
13.17 Twitter and Time Series
13.17 Q1: Which of the following statements is false?
a. A time series is a sequence of values with timestamps. Some time series exam-
ples are daily closing stock prices, daily high temperatures at a given location,
monthly U.S. job-creation numbers, quarterly earnings for a given company and
more.
b. Tweets could be a natural for time-series analysis if they were time stamped.
In its next major release, Twitter is consider adding time stamps to tweets.
c. A popular machine learning technique called simple linear regression is used
to make predictions with time series.
d. A popular deep learning technique called recurrent neural networks also is
used to make predictions with time series.