Gathering Data

In [1]:
import tweepy
from tweepy import OAuthHandler
import json
from timeit import default_timer as timer
import pandas as pd
import numpy as np
import requests
import os 
import matplotlib.pyplot as plt
% matplotlib inline
import seaborn as sns
In [2]:
# read csv file.
df = pd.read_csv('twitter-archive-enhanced.csv')
In [3]:
# create copy of df.
df_doggo = df.copy()
In [4]:
df_doggo.head()
Out[4]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
0 892420643555336193 NaN NaN 2017-08-01 16:23:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Phineas. He's a mystical boy. Only eve... NaN NaN NaN https://twitter.com/dog_rates/status/892420643... 13 10 Phineas None None None None
1 892177421306343426 NaN NaN 2017-08-01 00:17:27 +0000 <a href="http://twitter.com/download/iphone" r... This is Tilly. She's just checking pup on you.... NaN NaN NaN https://twitter.com/dog_rates/status/892177421... 13 10 Tilly None None None None
2 891815181378084864 NaN NaN 2017-07-31 00:18:03 +0000 <a href="http://twitter.com/download/iphone" r... This is Archie. He is a rare Norwegian Pouncin... NaN NaN NaN https://twitter.com/dog_rates/status/891815181... 12 10 Archie None None None None
3 891689557279858688 NaN NaN 2017-07-30 15:58:51 +0000 <a href="http://twitter.com/download/iphone" r... This is Darla. She commenced a snooze mid meal... NaN NaN NaN https://twitter.com/dog_rates/status/891689557... 13 10 Darla None None None None
4 891327558926688256 NaN NaN 2017-07-29 16:00:24 +0000 <a href="http://twitter.com/download/iphone" r... This is Franklin. He would like you to stop ca... NaN NaN NaN https://twitter.com/dog_rates/status/891327558... 12 10 Franklin None None None None
In [5]:
# Programmatically download file from website.
response = requests.get("https://d17h27t6h515a5.cloudfront.net/topher/2017/August/599fd2ad_image-predictions/image-predictions.tsv")
with open('image-predictions.tsv', mode='wb') as file:
    file.write(response.content)
In [6]:
df_i = pd.read_csv('image-predictions.tsv', sep='\t')
In [7]:
# Make a copy of df_i.
df_image = df_i.copy()
In [8]:
# Query Twitter API for each tweet in the Twitter archive and save JSON in a text file
# These are hidden to comply with Twitter's API terms and conditions
consumer_key = ''
consumer_secret = ''
access_token = ''
access_secret = ''

auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)

api = tweepy.API(auth, wait_on_rate_limit=True)

# NOTE TO STUDENT WITH MOBILE VERIFICATION ISSUES:
# df_1 is a DataFrame with the twitter_archive_enhanced.csv file. You may have to
# change line 17 to match the name of your DataFrame with twitter_archive_enhanced.csv
# NOTE TO REVIEWER: this student had mobile verification issues so the following
# Twitter API code was sent to this student from a Udacity instructor
# Tweet IDs for which to gather additional data via Twitter's API
tweet_ids = df.tweet_id.values
len(tweet_ids)

# Query Twitter's API for JSON data for each tweet ID in the Twitter archive
count = 0
fails_dict = {}
start = timer()
# Save each tweet's returned JSON as a new line in a .txt file
with open('tweet_json.txt', 'w') as outfile:
    # This loop will likely take 20-30 minutes to run because of Twitter's rate limit
    for tweet_id in tweet_ids:
        count += 1
        print(str(count) + ": " + str(tweet_id))
        try:
            tweet = api.get_status(tweet_id, tweet_mode='extended')
            print("Success")
            json.dump(tweet._json, outfile)
            outfile.write('\n')
        except tweepy.TweepError as e:
            print("Fail")
            fails_dict[tweet_id] = e
            pass
end = timer()
print(end - start)
print(fails_dict)
Out[8]:
'\n# Query Twitter API for each tweet in the Twitter archive and save JSON in a text file\n# These are hidden to comply with Twitter\'s API terms and conditions\nconsumer_key = \'\'\nconsumer_secret = \'\'\naccess_token = \'\'\naccess_secret = \'\'\n\nauth = OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_secret)\n\napi = tweepy.API(auth, wait_on_rate_limit=True)\n\n# NOTE TO STUDENT WITH MOBILE VERIFICATION ISSUES:\n# df_1 is a DataFrame with the twitter_archive_enhanced.csv file. You may have to\n# change line 17 to match the name of your DataFrame with twitter_archive_enhanced.csv\n# NOTE TO REVIEWER: this student had mobile verification issues so the following\n# Twitter API code was sent to this student from a Udacity instructor\n# Tweet IDs for which to gather additional data via Twitter\'s API\ntweet_ids = df.tweet_id.values\nlen(tweet_ids)\n\n# Query Twitter\'s API for JSON data for each tweet ID in the Twitter archive\ncount = 0\nfails_dict = {}\nstart = timer()\n# Save each tweet\'s returned JSON as a new line in a .txt file\nwith open(\'tweet_json.txt\', \'w\') as outfile:\n    # This loop will likely take 20-30 minutes to run because of Twitter\'s rate limit\n    for tweet_id in tweet_ids:\n        count += 1\n        print(str(count) + ": " + str(tweet_id))\n        try:\n            tweet = api.get_status(tweet_id, tweet_mode=\'extended\')\n            print("Success")\n            json.dump(tweet._json, outfile)\n            outfile.write(\'\n\')\n        except tweepy.TweepError as e:\n            print("Fail")\n            fails_dict[tweet_id] = e\n            pass\nend = timer()\nprint(end - start)\nprint(fails_dict)\n'
In [9]:
# Create new dataframe with id, retweet_count, and favorite_count.

tweet_json = open('tweet_json.txt', 'r')
df_tweet = pd.DataFrame(columns=['tweet_id', 'retweets', 'favorites'])

for line in tweet_json:
    tweet = json.loads(line)
    df_tweet = df_tweet.append({'tweet_id': tweet['id'], 'retweets': tweet['retweet_count'], 'favorites': tweet['favorite_count']}, ignore_index=True)
tweet_json.close()

df_tweet
Out[9]:
tweet_id retweets favorites
0 892420643555336193 8230 37772
1 892177421306343426 6081 32450
2 891815181378084864 4024 24435
3 891689557279858688 8386 41105
4 891327558926688256 9087 39314
5 891087950875897856 3015 19770
6 890971913173991426 1991 11554
7 890729181411237888 18287 63711
8 890609185150312448 4139 27160
9 890240255349198849 7153 31147
10 890006608113172480 7111 29941
11 889880896479866881 4823 27147
12 889665388333682689 9732 46919
13 889638837579907072 4392 26473
14 889531135344209921 2184 14757
15 889278841981685760 5207 24630
16 888917238123831296 4368 28421
17 888804989199671297 4151 24946
18 888554962724278272 3429 19345
19 888078434458587136 3386 21233
20 887705289381826560 5221 29475
21 887517139158093824 11349 45157
22 887473957103951883 17621 67314
23 887343217045368832 10113 32869
24 887101392804085760 5783 29839
25 886983233522544640 7533 34279
26 886736880519319552 3172 11765
27 886680336477933568 4327 21900
28 886366144734445568 3105 20672
29 886267009285017600 4 116
... ... ... ...
2309 666411507551481857 321 433
2310 666407126856765440 40 105
2311 666396247373291520 83 162
2312 666373753744588802 88 183
2313 666362758909284353 559 757
2314 666353288456101888 71 215
2315 666345417576210432 132 284
2316 666337882303524864 89 192
2317 666293911632134144 343 489
2318 666287406224695296 63 142
2319 666273097616637952 76 170
2320 666268910803644416 35 100
2321 666104133288665088 6371 14013
2322 666102155909144576 11 77
2323 666099513787052032 66 150
2324 666094000022159362 72 160
2325 666082916733198337 44 113
2326 666073100786774016 159 315
2327 666071193221509120 58 142
2328 666063827256086533 213 464
2329 666058600524156928 57 109
2330 666057090499244032 138 290
2331 666055525042405380 235 428
2332 666051853826850816 829 1195
2333 666050758794694657 57 130
2334 666049248165822465 42 105
2335 666044226329800704 136 290
2336 666033412701032449 43 122
2337 666029285002620928 46 125
2338 666020888022790149 498 2524

2339 rows × 3 columns

In [10]:
# Make a copy of df_tweet.
df_tweet_data = df_tweet.copy()

Assessing Data

In [11]:
# Check data types are compatible and columns are not missing entries.
df_doggo.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2356 entries, 0 to 2355
Data columns (total 17 columns):
tweet_id                      2356 non-null int64
in_reply_to_status_id         78 non-null float64
in_reply_to_user_id           78 non-null float64
timestamp                     2356 non-null object
source                        2356 non-null object
text                          2356 non-null object
retweeted_status_id           181 non-null float64
retweeted_status_user_id      181 non-null float64
retweeted_status_timestamp    181 non-null object
expanded_urls                 2297 non-null object
rating_numerator              2356 non-null int64
rating_denominator            2356 non-null int64
name                          2356 non-null object
doggo                         2356 non-null object
floofer                       2356 non-null object
pupper                        2356 non-null object
puppo                         2356 non-null object
dtypes: float64(4), int64(3), object(10)
memory usage: 313.0+ KB
In [12]:
# Check data types are compatible and columns are not missing entries.
df_image.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2075 entries, 0 to 2074
Data columns (total 12 columns):
tweet_id    2075 non-null int64
jpg_url     2075 non-null object
img_num     2075 non-null int64
p1          2075 non-null object
p1_conf     2075 non-null float64
p1_dog      2075 non-null bool
p2          2075 non-null object
p2_conf     2075 non-null float64
p2_dog      2075 non-null bool
p3          2075 non-null object
p3_conf     2075 non-null float64
p3_dog      2075 non-null bool
dtypes: bool(3), float64(3), int64(2), object(4)
memory usage: 152.1+ KB
In [13]:
# Check data types are compatible and columns are not missing entries.
df_tweet_data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2339 entries, 0 to 2338
Data columns (total 3 columns):
tweet_id     2339 non-null object
retweets     2339 non-null object
favorites    2339 non-null object
dtypes: object(3)
memory usage: 54.9+ KB
In [14]:
# Make sure numerators are consistent.
df_doggo.rating_numerator.unique()
Out[14]:
array([  13,   12,   14,    5,   17,   11,   10,  420,  666,    6,   15,
        182,  960,    0,   75,    7,   84,    9,   24,    8,    1,   27,
          3,    4,  165, 1776,  204,   50,   99,   80,   45,   60,   44,
        143,  121,   20,   26,    2,  144,   88])
In [15]:
# Check for any numerators that equal zero.
df_doggo[df_doggo.rating_numerator == 0]
Out[15]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
315 835152434251116546 NaN NaN 2017-02-24 15:40:31 +0000 <a href="http://twitter.com/download/iphone" r... When you're so blinded by your systematic plag... NaN NaN NaN https://twitter.com/dog_rates/status/835152434... 0 10 None None None None None
1016 746906459439529985 7.468859e+17 4.196984e+09 2016-06-26 03:22:31 +0000 <a href="http://twitter.com/download/iphone" r... PUPDATE: can't see any. Even if I could, I cou... NaN NaN NaN https://twitter.com/dog_rates/status/746906459... 0 10 None None None None None
In [16]:
# Make sure denominators are consistent
df_doggo.rating_denominator.unique()
Out[16]:
array([ 10,   0,  15,  70,   7,  11, 150, 170,  20,  50,  90,  80,  40,
       130, 110,  16, 120,   2])
In [17]:
# Check for any denominators that equal zero.
df_doggo[df_doggo.rating_denominator == 0]
Out[17]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
313 835246439529840640 8.352460e+17 26259576.0 2017-02-24 21:54:03 +0000 <a href="http://twitter.com/download/iphone" r... @jonnysun @Lin_Manuel ok jomny I know you're e... NaN NaN NaN NaN 960 0 None None None None None
In [18]:
# Detect entries where there are more than one dog stage.
df_doggo.loc[(df_doggo[['doggo', 'floofer', 'pupper', 'puppo']] != 'None').sum(axis=1) > 1]
Out[18]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
191 855851453814013952 NaN NaN 2017-04-22 18:31:02 +0000 <a href="http://twitter.com/download/iphone" r... Here's a puppo participating in the #ScienceMa... NaN NaN NaN https://twitter.com/dog_rates/status/855851453... 13 10 None doggo None None puppo
200 854010172552949760 NaN NaN 2017-04-17 16:34:26 +0000 <a href="http://twitter.com/download/iphone" r... At first I thought this was a shy doggo, but i... NaN NaN NaN https://twitter.com/dog_rates/status/854010172... 11 10 None doggo floofer None None
460 817777686764523521 NaN NaN 2017-01-07 16:59:28 +0000 <a href="http://twitter.com/download/iphone" r... This is Dido. She's playing the lead role in "... NaN NaN NaN https://twitter.com/dog_rates/status/817777686... 13 10 Dido doggo None pupper None
531 808106460588765185 NaN NaN 2016-12-12 00:29:28 +0000 <a href="http://twitter.com/download/iphone" r... Here we have Burke (pupper) and Dexter (doggo)... NaN NaN NaN https://twitter.com/dog_rates/status/808106460... 12 10 None doggo None pupper None
565 802265048156610565 7.331095e+17 4.196984e+09 2016-11-25 21:37:47 +0000 <a href="http://twitter.com/download/iphone" r... Like doggo, like pupper version 2. Both 11/10 ... NaN NaN NaN https://twitter.com/dog_rates/status/802265048... 11 10 None doggo None pupper None
575 801115127852503040 NaN NaN 2016-11-22 17:28:25 +0000 <a href="http://twitter.com/download/iphone" r... This is Bones. He's being haunted by another d... NaN NaN NaN https://twitter.com/dog_rates/status/801115127... 12 10 Bones doggo None pupper None
705 785639753186217984 NaN NaN 2016-10-11 00:34:48 +0000 <a href="http://twitter.com/download/iphone" r... This is Pinot. He's a sophisticated doggo. You... NaN NaN NaN https://twitter.com/dog_rates/status/785639753... 10 10 Pinot doggo None pupper None
733 781308096455073793 NaN NaN 2016-09-29 01:42:20 +0000 <a href="http://vine.co" rel="nofollow">Vine -... Pupper butt 1, Doggo 0. Both 12/10 https://t.c... NaN NaN NaN https://vine.co/v/5rgu2Law2ut 12 10 None doggo None pupper None
778 775898661951791106 NaN NaN 2016-09-14 03:27:11 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: Like father (doggo), like son (... 7.331095e+17 4.196984e+09 2016-05-19 01:38:16 +0000 https://twitter.com/dog_rates/status/733109485... 12 10 None doggo None pupper None
822 770093767776997377 NaN NaN 2016-08-29 03:00:36 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: This is just downright precious... 7.410673e+17 4.196984e+09 2016-06-10 00:39:48 +0000 https://twitter.com/dog_rates/status/741067306... 12 10 just doggo None pupper None
889 759793422261743616 NaN NaN 2016-07-31 16:50:42 +0000 <a href="http://twitter.com/download/iphone" r... Meet Maggie &amp; Lila. Maggie is the doggo, L... NaN NaN NaN https://twitter.com/dog_rates/status/759793422... 12 10 Maggie doggo None pupper None
956 751583847268179968 NaN NaN 2016-07-09 01:08:47 +0000 <a href="http://twitter.com/download/iphone" r... Please stop sending it pictures that don't eve... NaN NaN NaN https://twitter.com/dog_rates/status/751583847... 5 10 None doggo None pupper None
1063 741067306818797568 NaN NaN 2016-06-10 00:39:48 +0000 <a href="http://twitter.com/download/iphone" r... This is just downright precious af. 12/10 for ... NaN NaN NaN https://twitter.com/dog_rates/status/741067306... 12 10 just doggo None pupper None
1113 733109485275860992 NaN NaN 2016-05-19 01:38:16 +0000 <a href="http://twitter.com/download/iphone" r... Like father (doggo), like son (pupper). Both 1... NaN NaN NaN https://twitter.com/dog_rates/status/733109485... 12 10 None doggo None pupper None
In [19]:
# Convert all entries in df_tweet_data to integer to help assess data further.
df_tweet_data = df_tweet_data.astype(str).astype(int)
In [20]:
# Check if there are any favorite entries that equal zero.
df_tweet_data[df_tweet_data['favorites'] == 0]
Out[20]:
tweet_id retweets favorites
31 886054160059072513 104 0
35 885311592912609280 17989 0
67 879130579576475649 6633 0
72 878404777348136964 1252 0
73 878316110768087041 6473 0
77 877611172832227328 78 0
90 874434818259525634 14377 0
95 873337748698140672 1551 0
105 871166179821445120 5604 0
119 868639477480148993 2077 0
125 867072653475098625 120 0
131 866094527597207552 8336 0
140 863471782782697472 2446 0
152 860981674716409858 2173 0
153 860924035999428608 825 0
158 860177593139703809 31136 0
164 858860390427611136 8241 0
173 857062103051644929 174 0
175 856602993587888130 10886 0
178 856330835276025856 689 0
187 855245323840757760 6124 0
188 855138241867124737 47 0
197 852936405516943360 2070 0
204 851953902622658560 9969 0
205 851861385021730816 23 0
215 849668094696017920 5155 0
223 847978865427394560 3401 0
224 847971574464610304 444 0
242 845098359547420673 8043 0
257 841833993020538882 16173 0
... ... ... ...
760 776249906839351296 9868 0
765 775898661951791106 17742 0
780 773336787167145985 5487 0
786 772615324260794368 3628 0
797 771171053431250945 8130 0
801 771004394259247104 234 0
807 770093767776997377 3268 0
811 769335591808995329 8259 0
814 768909767477751808 2890 0
818 768554158521745409 6261 0
826 766864461642756096 6059 0
832 766078092750233600 2791 0
845 763167063695355904 3242 0
853 761750502866649088 4221 0
857 761371037149827077 19270 0
870 760153949710192640 33 0
875 759566828574212096 22633 0
880 759159934323924993 1242 0
893 757729163776290825 8678 0
896 757597904299253760 313 0
911 754874841593970688 8565 0
921 753298634498793472 6152 0
927 752701944171524096 3091 0
933 752309394570878976 17859 0
996 747242308580548608 3054 0
1007 746521445350707200 1042 0
1027 743835915802583040 2205 0
1226 711998809858043904 131 0
2242 667550904950915073 35 0
2243 667550882905632768 33 0

167 rows × 3 columns

In [21]:
# Check if there are more retweets than favorites for a tweet (as this is unusual)
df_tweet_data[df_tweet_data['retweets'] > df_tweet_data['favorites']]
Out[21]:
tweet_id retweets favorites
31 886054160059072513 104 0
35 885311592912609280 17989 0
67 879130579576475649 6633 0
72 878404777348136964 1252 0
73 878316110768087041 6473 0
77 877611172832227328 78 0
90 874434818259525634 14377 0
95 873337748698140672 1551 0
105 871166179821445120 5604 0
119 868639477480148993 2077 0
125 867072653475098625 120 0
131 866094527597207552 8336 0
140 863471782782697472 2446 0
152 860981674716409858 2173 0
153 860924035999428608 825 0
158 860177593139703809 31136 0
164 858860390427611136 8241 0
173 857062103051644929 174 0
175 856602993587888130 10886 0
178 856330835276025856 689 0
187 855245323840757760 6124 0
188 855138241867124737 47 0
197 852936405516943360 2070 0
204 851953902622658560 9969 0
205 851861385021730816 23 0
215 849668094696017920 5155 0
223 847978865427394560 3401 0
224 847971574464610304 444 0
242 845098359547420673 8043 0
257 841833993020538882 16173 0
... ... ... ...
760 776249906839351296 9868 0
765 775898661951791106 17742 0
780 773336787167145985 5487 0
786 772615324260794368 3628 0
797 771171053431250945 8130 0
801 771004394259247104 234 0
807 770093767776997377 3268 0
811 769335591808995329 8259 0
814 768909767477751808 2890 0
818 768554158521745409 6261 0
826 766864461642756096 6059 0
832 766078092750233600 2791 0
845 763167063695355904 3242 0
853 761750502866649088 4221 0
857 761371037149827077 19270 0
870 760153949710192640 33 0
875 759566828574212096 22633 0
880 759159934323924993 1242 0
893 757729163776290825 8678 0
896 757597904299253760 313 0
911 754874841593970688 8565 0
921 753298634498793472 6152 0
927 752701944171524096 3091 0
933 752309394570878976 17859 0
996 747242308580548608 3054 0
1007 746521445350707200 1042 0
1027 743835915802583040 2205 0
1226 711998809858043904 131 0
2242 667550904950915073 35 0
2243 667550882905632768 33 0

167 rows × 3 columns

In [22]:
# See if there are any duplicates in the data frame.
sum(df_tweet_data.duplicated())
Out[22]:
0
In [23]:
# See if there are any duplicates in the data frame.
sum(df_image.duplicated())
Out[23]:
0
In [24]:
# See if there are any dupulicates in the data frame.
sum(df_doggo.duplicated())
Out[24]:
0

Detect and document at least eight (8) quality issues and two (2) tidiness issues

Quality issue dimensions are:

  1. Completeness: do we have all of the records that we should? Do we have missing records or not? Are there specific rows, columns, or cells missing?
  2. Validity: we have the records, but they’re not valid, i.e., they don’t conform to a defined schema. A schema is a defined set of rules for data. These rules can be real-world constraints (e.g. negative height is impossible) and table-specific constraints (e.g. unique key constraints in tables).
  3. Accuracy: inaccurate data is wrong data that is valid. It adheres to the defined schema, but it is still incorrect. Example: a patient’s weight that is 5 lbs too heavy because the scale was faulty.
  4. Consistency: inconsistent data is both valid and accurate, but there are multiple correct ways of referring to the same thing. Consistency, i.e., a standard format, in columns that represent the same data across tables and/or within tables is desired.

Tidy Data requirements:

  1. Each variable forms a column.
  2. Each observation forms a row.
  3. Each type of observational unit forms a table.

Quality Issues

  1. Missing values for dog stage (incomplete data for doggo, floofer, pupper, puppo) in df_doggo.
  2. Multiple values for dog stage in df_doggo.
  3. Rating numerators and rating denominators values are incorrect in df_doggo.
  4. Remove entries that are retweets in df_doggo.
  5. Replace 'None' with 'NaN' for all dog stages in df_doggo.
  6. Columns pertaining to retweets and expanded URLs are unnecessary in df_doggo.
  7. Remove entries where p1_dog, p2_dog, and p3_dog are all "False" in df_image.
  8. Values for p1, p2, and p3 sometimes capitalized but not always in df_image.
  9. All columns in df_tweet_data should be integers.
  10. 167 rows missing data for favorites in df_tweet_data.

Tidiness Issues

  1. Doggo, floofer, pupper, puppo are one variable spread across different columns in df_doggo.
  2. rating_numerator and rating_denominator can be combined into one column in df_doggo.
  3. Combine data frames by tweet_id.

Cleaning Data

Quality Issues

1. Missing values for dog stage (incomplete data for doggo, floofer, pupper, puppo) in df_doggo.

  • Remove rows that contain "None" values for all dog stages.

Code

In [25]:
df_doggo_1 = df_doggo.query('doggo != "None" or floofer != "None" or pupper != "None" or puppo != "None"')

Test

In [26]:
df_doggo_1
Out[26]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 <a href="http://twitter.com/download/iphone" r... This is Cassie. She is a college pup. Studying... NaN NaN NaN https://twitter.com/dog_rates/status/890240255... 14 10 Cassie doggo None None None
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 <a href="http://twitter.com/download/iphone" r... Here's a puppo that seems to be on the fence a... NaN NaN NaN https://twitter.com/dog_rates/status/889665388... 13 10 None None None None puppo
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 <a href="http://twitter.com/download/iphone" r... This is Stuart. He's sporting his favorite fan... NaN NaN NaN https://twitter.com/dog_rates/status/889531135... 13 10 Stuart None None None puppo
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Roscoe. Another pupper fallen victim t... NaN NaN NaN https://twitter.com/dog_rates/status/886366144... 12 10 Roscoe None None pupper None
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 <a href="http://twitter.com/download/iphone" r... Meet Yogi. He doesn't have any important dog m... NaN NaN NaN https://twitter.com/dog_rates/status/884162670... 12 10 Yogi doggo None None None
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 <a href="http://twitter.com/download/iphone" r... Meet Grizzwald. He may be the floofiest floofe... NaN NaN NaN https://twitter.com/dog_rates/status/883360690... 13 10 Grizzwald None floofer None None
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 <a href="http://twitter.com/download/iphone" r... This is Gus. He's quite the cheeky pupper. Alr... NaN NaN NaN https://twitter.com/dog_rates/status/882762694... 12 10 Gus None None pupper None
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 <a href="http://twitter.com/download/iphone" r... Here is a pupper approaching maximum borkdrive... NaN NaN NaN https://twitter.com/dog_rates/status/881536004... 14 10 a None None pupper None
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 <a href="http://twitter.com/download/iphone" r... This is Snoopy. He's a proud #PrideMonthPuppo.... NaN NaN NaN https://twitter.com/dog_rates/status/878776093... 13 10 Snoopy None None None puppo
78 877611172832227328 NaN NaN 2017-06-21 19:36:23 +0000 <a href="http://twitter.com/download/iphone" r... RT @rachel2195: @dog_rates the boyfriend and h... 8.768508e+17 5.128045e+08 2017-06-19 17:14:49 +0000 https://twitter.com/rachel2195/status/87685077... 14 10 None None None pupper None
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 <a href="http://twitter.com/download/iphone" r... This is Ginger. She's having a ruff Monday. To... NaN NaN NaN https://twitter.com/dog_rates/status/876838120... 12 10 Ginger None None pupper None
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 <a href="http://twitter.com/download/iphone" r... This is Jed. He may be the fanciest pupper in ... NaN NaN NaN https://twitter.com/dog_rates/status/874296783... 13 10 Jed None None pupper None
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Sebastian. He can't see all the colors... NaN NaN NaN https://twitter.com/dog_rates/status/874012996... 13 10 Sebastian None None None puppo
97 873337748698140672 NaN NaN 2017-06-10 00:35:19 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: This is Sierra. She's one preci... 8.732138e+17 4.196984e+09 2017-06-09 16:22:42 +0000 https://www.gofundme.com/help-my-baby-sierra-g... 12 10 Sierra None None pupper None
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 <a href="http://twitter.com/download/iphone" r... This is Sierra. She's one precious pupper. Abs... NaN NaN NaN https://www.gofundme.com/help-my-baby-sierra-g... 12 10 Sierra None None pupper None
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 <a href="http://twitter.com/download/iphone" r... Here's a very large dog. He has a date later. ... NaN NaN NaN https://twitter.com/dog_rates/status/872967104... 12 10 None doggo None None None
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Rover. As part of pupper protocol he h... NaN NaN NaN https://twitter.com/dog_rates/status/871762521... 12 10 Rover None None pupper None
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 <a href="http://twitter.com/download/iphone" r... This is Napolean. He's a Raggedy East Nicaragu... NaN NaN NaN https://twitter.com/dog_rates/status/871515927... 12 10 Napolean doggo None None None
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 <a href="http://twitter.com/download/iphone" r... Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH NaN NaN NaN https://twitter.com/animalcog/status/871075758... 14 10 None doggo None None None
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Scout. He just graduated. Officially a... NaN NaN NaN https://twitter.com/dog_rates/status/869596645... 12 10 Scout doggo None None None
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 <a href="http://twitter.com/download/iphone" r... This is Shikha. She just watched you drop a sk... NaN NaN NaN https://twitter.com/dog_rates/status/867421006... 12 10 Shikha None None None puppo
132 866816280283807744 NaN NaN 2017-05-23 00:41:20 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: This is Jamesy. He gives a kiss... 8.664507e+17 4.196984e+09 2017-05-22 00:28:40 +0000 https://twitter.com/dog_rates/status/866450705... 13 10 Jamesy None None pupper None
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 <a href="http://twitter.com/download/iphone" r... This is Jamesy. He gives a kiss to every other... NaN NaN NaN https://twitter.com/dog_rates/status/866450705... 13 10 Jamesy None None pupper None
137 866094527597207552 NaN NaN 2017-05-21 00:53:21 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: Here's a pupper before and afte... 8.378202e+17 4.196984e+09 2017-03-04 00:21:08 +0000 https://twitter.com/dog_rates/status/837820167... 12 10 None None None pupper None
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 <a href="http://twitter.com/download/iphone" r... Sorry for the lack of posts today. I came home... NaN NaN NaN https://twitter.com/dog_rates/status/859607811... 13 10 None None None None puppo
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 <a href="http://twitter.com/download/iphone" r... I have stumbled puppon a doggo painting party.... NaN NaN NaN https://twitter.com/dog_rates/status/858843525... 13 10 None doggo None None None
191 855851453814013952 NaN NaN 2017-04-22 18:31:02 +0000 <a href="http://twitter.com/download/iphone" r... Here's a puppo participating in the #ScienceMa... NaN NaN NaN https://twitter.com/dog_rates/status/855851453... 13 10 None doggo None None puppo
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 <a href="http://twitter.com/download/iphone" r... Sometimes you guys remind me just how impactfu... NaN NaN NaN https://twitter.com/dog_rates/status/854120357... 14 10 None None None pupper None
200 854010172552949760 NaN NaN 2017-04-17 16:34:26 +0000 <a href="http://twitter.com/download/iphone" r... At first I thought this was a shy doggo, but i... NaN NaN NaN https://twitter.com/dog_rates/status/854010172... 11 10 None doggo floofer None None
211 851953902622658560 NaN NaN 2017-04-12 00:23:33 +0000 <a href="http://twitter.com/download/iphone" r... RT @dog_rates: This is Astrid. She's a guide d... 8.293743e+17 4.196984e+09 2017-02-08 17:00:26 +0000 https://twitter.com/dog_rates/status/829374341... 13 10 Astrid doggo None None None
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 <a href="http://twitter.com/download/iphone" r... Meet Zuzu. He just graduated college. Astute p... NaN NaN NaN https://twitter.com/dog_rates/status/675113801... 10 10 Zuzu None None pupper None
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Mollie. This pic was taken after ... NaN NaN NaN https://twitter.com/dog_rates/status/675006312... 10 10 Mollie None None pupper None
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 <a href="http://twitter.com/download/iphone" r... This is Superpup. His head isn't proportional ... NaN NaN NaN https://twitter.com/dog_rates/status/674774481... 11 10 Superpup None None pupper None
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 <a href="http://twitter.com/download/iphone" r... Meet Rufio. He is unaware of the pink legless ... NaN NaN NaN https://twitter.com/dog_rates/status/674737130... 10 10 Rufio None None pupper None
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 <a href="http://twitter.com/download/iphone" r... This pupper is fed up with being tickled. 12/1... NaN NaN NaN https://twitter.com/dog_rates/status/674638615... 12 10 None None None pupper None
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 <a href="http://twitter.com/download/iphone" r... This pupper just wants a belly rub. This puppe... NaN NaN NaN https://twitter.com/dog_rates/status/674447403... 10 10 None None None pupper None
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 <a href="http://twitter.com/download/iphone" r... This is Lennon. He's in quite the predicament.... NaN NaN NaN https://twitter.com/dog_rates/status/674318007... 8 10 Lennon None None pupper None
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 <a href="http://twitter.com/download/iphone" r... This is Gus. He's super stoked about being an ... NaN NaN NaN https://twitter.com/dog_rates/status/674262580... 9 10 Gus None None pupper None
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 <a href="http://twitter.com/download/iphone" r... This is Kaiya. She's an aspiring shoe model. 1... NaN NaN NaN https://twitter.com/dog_rates/status/674038233... 12 10 Kaiya None None pupper None
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 <a href="http://twitter.com/download/iphone" r... This is one esteemed pupper. Just graduated co... NaN NaN NaN https://twitter.com/dog_rates/status/673956914... 10 10 one None None pupper None
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Obie. He is on guard watching for evil... NaN NaN NaN https://twitter.com/dog_rates/status/673919437... 11 10 Obie None None pupper None
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 <a href="http://twitter.com/download/iphone" r... This is Raymond. He's absolutely terrified of ... NaN NaN NaN https://twitter.com/dog_rates/status/673707060... 10 10 Raymond None None pupper None
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Pickles. She's a tiny pointy pupper. A... NaN NaN NaN https://twitter.com/dog_rates/status/673697980... 8 10 Pickles None None pupper None
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 <a href="http://twitter.com/download/iphone" r... This is Albert AKA King Banana Peel. He's a ki... NaN NaN NaN https://twitter.com/dog_rates/status/673656262... 10 10 Albert None None pupper None
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 <a href="http://twitter.com/download/iphone" r... This is Jeffri. He's a speckled ice pupper. Ve... NaN NaN NaN https://twitter.com/dog_rates/status/673612854... 7 10 Jeffri None None pupper None
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 <a href="http://twitter.com/download/iphone" r... This little pupper can't wait for Christmas. H... NaN NaN NaN https://twitter.com/dog_rates/status/673363615... 11 10 None None None pupper None
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 <a href="http://twitter.com/download/iphone" r... This is Django. He's a skilled assassin pupper... NaN NaN NaN https://twitter.com/dog_rates/status/673342308... 10 10 Django None None pupper None
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 <a href="http://twitter.com/download/iphone" r... Meet Eve. She's a raging alcoholic 8/10 (would... NaN NaN NaN https://twitter.com/dog_rates/status/673295268... 8 10 Eve None None pupper None
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Fletcher. He's had a ruff night. No mo... NaN NaN NaN https://twitter.com/dog_rates/status/673148804... 8 10 Fletcher None None pupper None
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 <a href="http://twitter.com/download/iphone" r... This is Schnozz. He's had a blurred tail since... NaN NaN NaN https://twitter.com/dog_rates/status/672988786... 10 10 Schnozz None None pupper None
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 <a href="http://twitter.com/download/iphone" r... This is Chuckles. He is one skeptical pupper. ... NaN NaN NaN https://twitter.com/dog_rates/status/672975131... 10 10 Chuckles None None pupper None
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 <a href="http://twitter.com/download/iphone" r... This is Chet. He's having a hard time. Really ... NaN NaN NaN https://twitter.com/dog_rates/status/672970152... 7 10 Chet None None pupper None
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 <a href="http://twitter.com/download/iphone" r... This is Cheryl AKA Queen Pupper of the Skies. ... NaN NaN NaN https://twitter.com/dog_rates/status/672898206... 11 10 Cheryl None None pupper None
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 <a href="http://twitter.com/download/iphone" r... This lil pupper is sad because we haven't foun... NaN NaN NaN https://twitter.com/dog_rates/status/672622327... 12 10 None None None pupper None
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 <a href="http://twitter.com/download/iphone" r... This is Norman. Doesn't bark much. Very docile... NaN NaN NaN https://twitter.com/dog_rates/status/672614745... 6 10 Norman None None pupper None
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 <a href="http://twitter.com/download/iphone" r... Meet Scott. Just trying to catch his train to ... NaN NaN NaN https://twitter.com/dog_rates/status/672594978... 9 10 Scott None None pupper None
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Jazz. She should be on the cover ... NaN NaN NaN https://twitter.com/dog_rates/status/672481316... 12 10 Jazz None None pupper None
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 <a href="http://twitter.com/download/iphone" r... This is Rolf. He's having the time of his life... NaN NaN NaN https://twitter.com/dog_rates/status/672254177... 11 10 Rolf None None pupper None
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Opal. He's a Royal John Coctostan. Rea... NaN NaN NaN https://twitter.com/dog_rates/status/672205392... 9 10 Opal None None pupper None
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Bubba. He's a Titted Peebles Aorta. Ev... NaN NaN NaN https://twitter.com/dog_rates/status/672160042... 8 10 Bubba None None pupper None

380 rows × 17 columns

2. Multiple values for dog stage in df_doggo.

  • Remove rows that contain multiple values for all dog stages.

Code

In [27]:
# Remove entries where there are more than one dog stage
df_doggo_1 = df_doggo_1.loc[(df_doggo_1[['doggo', 'floofer', 'pupper', 'puppo']] != 'None').sum(axis=1) == 1]

Test

In [28]:
df_doggo_1.loc[(df_doggo_1[['doggo', 'floofer', 'pupper', 'puppo']] != 'None').sum(axis=1) > 1]
Out[28]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo

3. rating_numerators and rating_denominator values are incorrect in df_doggo.

Code

In [29]:
df_doggo_1['rating_denominator'].unique()
Out[29]:
array([10])
In [30]:
df_doggo_1['rating_numerator'].unique()
Out[30]:
array([14, 13, 12, 10, 11,  7,  8, 27,  9,  3,  5,  6])
In [31]:
df_doggo_1['rating_numerator'] = df_doggo_1.text.str.extract('((?:\d+\.)?\d+)\/(\d+)', expand=True)
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  """Entry point for launching an IPython kernel.
In [32]:
df_doggo_1['rating_numerator'] = df_doggo_1['rating_numerator'].astype(str).astype(float)
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  """Entry point for launching an IPython kernel.
In [33]:
df_doggo_1['rating_denominator'] = df_doggo_1['rating_denominator'].astype(str).astype(float)
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  """Entry point for launching an IPython kernel.

Test

In [34]:
df_doggo_1['rating_denominator'].unique()
Out[34]:
array([ 10.])
In [35]:
df_doggo_1['rating_numerator'].unique()
Out[35]:
array([ 14.  ,  13.  ,  12.  ,  10.  ,  11.  ,   7.  ,   8.  ,  11.27,
         9.  ,   3.  ,   5.  ,   6.  ])
In [36]:
# Make sure that numerator and denominator are in compatible format
df_doggo_1['rating_numerator'] / df_doggo_1['rating_denominator']
Out[36]:
9       1.4
12      1.3
14      1.3
29      1.2
43      1.2
46      1.3
49      1.2
56      1.4
71      1.3
78      1.4
82      1.2
92      1.3
94      1.3
97      1.2
98      1.2
99      1.2
107     1.2
108     1.2
110     1.4
121     1.2
129     1.2
132     1.3
135     1.3
137     1.2
168     1.3
172     1.3
199     1.4
211     1.3
220     1.2
222     1.2
       ... 
1875    1.0
1880    1.0
1889    1.1
1897    1.0
1903    1.2
1907    1.0
1915    0.8
1921    0.9
1930    1.2
1936    1.0
1937    1.1
1945    1.0
1948    0.8
1954    1.0
1956    0.7
1960    1.1
1967    1.0
1970    0.8
1974    0.8
1977    1.0
1980    1.0
1981    0.7
1985    1.1
1991    1.2
1992    0.6
1995    0.9
2002    1.2
2009    1.1
2015    0.9
2017    0.8
Length: 366, dtype: float64

4. Remove entries that are retweets in df_doggo.

Code

In [37]:
df_doggo_2 = df_doggo_1.query('retweeted_status_id == "NaN"')

Test

In [38]:
# Test to see if retweet columns contain any values.

df_doggo_2.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 332 entries, 9 to 2017
Data columns (total 17 columns):
tweet_id                      332 non-null int64
in_reply_to_status_id         7 non-null float64
in_reply_to_user_id           7 non-null float64
timestamp                     332 non-null object
source                        332 non-null object
text                          332 non-null object
retweeted_status_id           0 non-null float64
retweeted_status_user_id      0 non-null float64
retweeted_status_timestamp    0 non-null object
expanded_urls                 326 non-null object
rating_numerator              332 non-null float64
rating_denominator            332 non-null float64
name                          332 non-null object
doggo                         332 non-null object
floofer                       332 non-null object
pupper                        332 non-null object
puppo                         332 non-null object
dtypes: float64(6), int64(1), object(10)
memory usage: 46.7+ KB

5. Replace 'None' with 'NaN' for all dog stages in df_doggo.

Code

In [39]:
df_doggo_2['doggo'] = np.where(df_doggo_2['doggo'] == 'None' , np.nan, df_doggo_2['doggo'])
df_doggo_2['floofer'] = np.where(df_doggo_2['floofer'] == 'None' , np.nan, df_doggo_2['floofer'])
df_doggo_2['pupper'] = np.where(df_doggo_2['pupper'] == 'None' , np.nan, df_doggo_2['pupper'])
df_doggo_2['puppo'] = np.where(df_doggo_2['puppo'] == 'None' , np.nan, df_doggo_2['puppo'])
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  """Entry point for launching an IPython kernel.
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:3: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  This is separate from the ipykernel package so we can avoid doing imports until
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  after removing the cwd from sys.path.

Test

In [40]:
df_doggo_2
Out[40]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp source text retweeted_status_id retweeted_status_user_id retweeted_status_timestamp expanded_urls rating_numerator rating_denominator name doggo floofer pupper puppo
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 <a href="http://twitter.com/download/iphone" r... This is Cassie. She is a college pup. Studying... NaN NaN NaN https://twitter.com/dog_rates/status/890240255... 14.0 10.0 Cassie doggo NaN NaN NaN
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 <a href="http://twitter.com/download/iphone" r... Here's a puppo that seems to be on the fence a... NaN NaN NaN https://twitter.com/dog_rates/status/889665388... 13.0 10.0 None NaN NaN NaN puppo
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 <a href="http://twitter.com/download/iphone" r... This is Stuart. He's sporting his favorite fan... NaN NaN NaN https://twitter.com/dog_rates/status/889531135... 13.0 10.0 Stuart NaN NaN NaN puppo
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Roscoe. Another pupper fallen victim t... NaN NaN NaN https://twitter.com/dog_rates/status/886366144... 12.0 10.0 Roscoe NaN NaN pupper NaN
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 <a href="http://twitter.com/download/iphone" r... Meet Yogi. He doesn't have any important dog m... NaN NaN NaN https://twitter.com/dog_rates/status/884162670... 12.0 10.0 Yogi doggo NaN NaN NaN
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 <a href="http://twitter.com/download/iphone" r... Meet Grizzwald. He may be the floofiest floofe... NaN NaN NaN https://twitter.com/dog_rates/status/883360690... 13.0 10.0 Grizzwald NaN floofer NaN NaN
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 <a href="http://twitter.com/download/iphone" r... This is Gus. He's quite the cheeky pupper. Alr... NaN NaN NaN https://twitter.com/dog_rates/status/882762694... 12.0 10.0 Gus NaN NaN pupper NaN
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 <a href="http://twitter.com/download/iphone" r... Here is a pupper approaching maximum borkdrive... NaN NaN NaN https://twitter.com/dog_rates/status/881536004... 14.0 10.0 a NaN NaN pupper NaN
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 <a href="http://twitter.com/download/iphone" r... This is Snoopy. He's a proud #PrideMonthPuppo.... NaN NaN NaN https://twitter.com/dog_rates/status/878776093... 13.0 10.0 Snoopy NaN NaN NaN puppo
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 <a href="http://twitter.com/download/iphone" r... This is Ginger. She's having a ruff Monday. To... NaN NaN NaN https://twitter.com/dog_rates/status/876838120... 12.0 10.0 Ginger NaN NaN pupper NaN
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 <a href="http://twitter.com/download/iphone" r... This is Jed. He may be the fanciest pupper in ... NaN NaN NaN https://twitter.com/dog_rates/status/874296783... 13.0 10.0 Jed NaN NaN pupper NaN
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Sebastian. He can't see all the colors... NaN NaN NaN https://twitter.com/dog_rates/status/874012996... 13.0 10.0 Sebastian NaN NaN NaN puppo
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 <a href="http://twitter.com/download/iphone" r... This is Sierra. She's one precious pupper. Abs... NaN NaN NaN https://www.gofundme.com/help-my-baby-sierra-g... 12.0 10.0 Sierra NaN NaN pupper NaN
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 <a href="http://twitter.com/download/iphone" r... Here's a very large dog. He has a date later. ... NaN NaN NaN https://twitter.com/dog_rates/status/872967104... 12.0 10.0 None doggo NaN NaN NaN
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Rover. As part of pupper protocol he h... NaN NaN NaN https://twitter.com/dog_rates/status/871762521... 12.0 10.0 Rover NaN NaN pupper NaN
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 <a href="http://twitter.com/download/iphone" r... This is Napolean. He's a Raggedy East Nicaragu... NaN NaN NaN https://twitter.com/dog_rates/status/871515927... 12.0 10.0 Napolean doggo NaN NaN NaN
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 <a href="http://twitter.com/download/iphone" r... Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH NaN NaN NaN https://twitter.com/animalcog/status/871075758... 14.0 10.0 None doggo NaN NaN NaN
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 <a href="http://twitter.com/download/iphone" r... This is Scout. He just graduated. Officially a... NaN NaN NaN https://twitter.com/dog_rates/status/869596645... 12.0 10.0 Scout doggo NaN NaN NaN
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 <a href="http://twitter.com/download/iphone" r... This is Shikha. She just watched you drop a sk... NaN NaN NaN https://twitter.com/dog_rates/status/867421006... 12.0 10.0 Shikha NaN NaN NaN puppo
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 <a href="http://twitter.com/download/iphone" r... This is Jamesy. He gives a kiss to every other... NaN NaN NaN https://twitter.com/dog_rates/status/866450705... 13.0 10.0 Jamesy NaN NaN pupper NaN
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 <a href="http://twitter.com/download/iphone" r... Sorry for the lack of posts today. I came home... NaN NaN NaN https://twitter.com/dog_rates/status/859607811... 13.0 10.0 None NaN NaN NaN puppo
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 <a href="http://twitter.com/download/iphone" r... I have stumbled puppon a doggo painting party.... NaN NaN NaN https://twitter.com/dog_rates/status/858843525... 13.0 10.0 None doggo NaN NaN NaN
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 <a href="http://twitter.com/download/iphone" r... Sometimes you guys remind me just how impactfu... NaN NaN NaN https://twitter.com/dog_rates/status/854120357... 14.0 10.0 None NaN NaN pupper NaN
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Boomer. He's a sandy pupper. Havi... NaN NaN NaN https://twitter.com/dog_rates/status/850019790... 12.0 10.0 Boomer NaN NaN pupper NaN
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 <a href="http://twitter.com/download/iphone" r... This is Barney. He's an elder doggo. Hitches a... NaN NaN NaN https://twitter.com/dog_rates/status/846514051... 13.0 10.0 Barney doggo NaN NaN NaN
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Mimosa. She's an emotional suppor... NaN NaN NaN https://www.gofundme.com/help-save-a-pup,https... 13.0 10.0 Mimosa doggo NaN NaN NaN
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 <a href="http://twitter.com/download/iphone" r... This is Pickles. She's a silly pupper. Thinks ... NaN NaN NaN https://twitter.com/dog_rates/status/845306882... 12.0 10.0 Pickles NaN NaN pupper NaN
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 <a href="http://twitter.com/download/iphone" r... Here's a pupper before and after being asked "... NaN NaN NaN https://twitter.com/dog_rates/status/837820167... 12.0 10.0 None NaN NaN pupper NaN
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 <a href="http://twitter.com/download/iphone" r... This is Clark. He passed pupper training today... NaN NaN NaN https://twitter.com/dog_rates/status/837110210... 13.0 10.0 Clark NaN NaN pupper NaN
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 <a href="http://twitter.com/download/iphone" r... This is Meera. She just heard about taxes and ... NaN NaN NaN https://twitter.com/dog_rates/status/836753516... 12.0 10.0 Meera doggo NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 <a href="http://twitter.com/download/iphone" r... Meet Zuzu. He just graduated college. Astute p... NaN NaN NaN https://twitter.com/dog_rates/status/675113801... 10.0 10.0 Zuzu NaN NaN pupper NaN
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Mollie. This pic was taken after ... NaN NaN NaN https://twitter.com/dog_rates/status/675006312... 10.0 10.0 Mollie NaN NaN pupper NaN
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 <a href="http://twitter.com/download/iphone" r... This is Superpup. His head isn't proportional ... NaN NaN NaN https://twitter.com/dog_rates/status/674774481... 11.0 10.0 Superpup NaN NaN pupper NaN
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 <a href="http://twitter.com/download/iphone" r... Meet Rufio. He is unaware of the pink legless ... NaN NaN NaN https://twitter.com/dog_rates/status/674737130... 10.0 10.0 Rufio NaN NaN pupper NaN
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 <a href="http://twitter.com/download/iphone" r... This pupper is fed up with being tickled. 12/1... NaN NaN NaN https://twitter.com/dog_rates/status/674638615... 12.0 10.0 None NaN NaN pupper NaN
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 <a href="http://twitter.com/download/iphone" r... This pupper just wants a belly rub. This puppe... NaN NaN NaN https://twitter.com/dog_rates/status/674447403... 10.0 10.0 None NaN NaN pupper NaN
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 <a href="http://twitter.com/download/iphone" r... This is Lennon. He's in quite the predicament.... NaN NaN NaN https://twitter.com/dog_rates/status/674318007... 8.0 10.0 Lennon NaN NaN pupper NaN
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 <a href="http://twitter.com/download/iphone" r... This is Gus. He's super stoked about being an ... NaN NaN NaN https://twitter.com/dog_rates/status/674262580... 9.0 10.0 Gus NaN NaN pupper NaN
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 <a href="http://twitter.com/download/iphone" r... This is Kaiya. She's an aspiring shoe model. 1... NaN NaN NaN https://twitter.com/dog_rates/status/674038233... 12.0 10.0 Kaiya NaN NaN pupper NaN
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 <a href="http://twitter.com/download/iphone" r... This is one esteemed pupper. Just graduated co... NaN NaN NaN https://twitter.com/dog_rates/status/673956914... 10.0 10.0 one NaN NaN pupper NaN
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Obie. He is on guard watching for evil... NaN NaN NaN https://twitter.com/dog_rates/status/673919437... 11.0 10.0 Obie NaN NaN pupper NaN
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 <a href="http://twitter.com/download/iphone" r... This is Raymond. He's absolutely terrified of ... NaN NaN NaN https://twitter.com/dog_rates/status/673707060... 10.0 10.0 Raymond NaN NaN pupper NaN
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Pickles. She's a tiny pointy pupper. A... NaN NaN NaN https://twitter.com/dog_rates/status/673697980... 8.0 10.0 Pickles NaN NaN pupper NaN
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 <a href="http://twitter.com/download/iphone" r... This is Albert AKA King Banana Peel. He's a ki... NaN NaN NaN https://twitter.com/dog_rates/status/673656262... 10.0 10.0 Albert NaN NaN pupper NaN
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 <a href="http://twitter.com/download/iphone" r... This is Jeffri. He's a speckled ice pupper. Ve... NaN NaN NaN https://twitter.com/dog_rates/status/673612854... 7.0 10.0 Jeffri NaN NaN pupper NaN
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 <a href="http://twitter.com/download/iphone" r... This little pupper can't wait for Christmas. H... NaN NaN NaN https://twitter.com/dog_rates/status/673363615... 11.0 10.0 None NaN NaN pupper NaN
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 <a href="http://twitter.com/download/iphone" r... This is Django. He's a skilled assassin pupper... NaN NaN NaN https://twitter.com/dog_rates/status/673342308... 10.0 10.0 Django NaN NaN pupper NaN
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 <a href="http://twitter.com/download/iphone" r... Meet Eve. She's a raging alcoholic 8/10 (would... NaN NaN NaN https://twitter.com/dog_rates/status/673295268... 8.0 10.0 Eve NaN NaN pupper NaN
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Fletcher. He's had a ruff night. No mo... NaN NaN NaN https://twitter.com/dog_rates/status/673148804... 8.0 10.0 Fletcher NaN NaN pupper NaN
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 <a href="http://twitter.com/download/iphone" r... This is Schnozz. He's had a blurred tail since... NaN NaN NaN https://twitter.com/dog_rates/status/672988786... 10.0 10.0 Schnozz NaN NaN pupper NaN
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 <a href="http://twitter.com/download/iphone" r... This is Chuckles. He is one skeptical pupper. ... NaN NaN NaN https://twitter.com/dog_rates/status/672975131... 10.0 10.0 Chuckles NaN NaN pupper NaN
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 <a href="http://twitter.com/download/iphone" r... This is Chet. He's having a hard time. Really ... NaN NaN NaN https://twitter.com/dog_rates/status/672970152... 7.0 10.0 Chet NaN NaN pupper NaN
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 <a href="http://twitter.com/download/iphone" r... This is Cheryl AKA Queen Pupper of the Skies. ... NaN NaN NaN https://twitter.com/dog_rates/status/672898206... 11.0 10.0 Cheryl NaN NaN pupper NaN
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 <a href="http://twitter.com/download/iphone" r... This lil pupper is sad because we haven't foun... NaN NaN NaN https://twitter.com/dog_rates/status/672622327... 12.0 10.0 None NaN NaN pupper NaN
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 <a href="http://twitter.com/download/iphone" r... This is Norman. Doesn't bark much. Very docile... NaN NaN NaN https://twitter.com/dog_rates/status/672614745... 6.0 10.0 Norman NaN NaN pupper NaN
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 <a href="http://twitter.com/download/iphone" r... Meet Scott. Just trying to catch his train to ... NaN NaN NaN https://twitter.com/dog_rates/status/672594978... 9.0 10.0 Scott NaN NaN pupper NaN
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 <a href="http://twitter.com/download/iphone" r... Say hello to Jazz. She should be on the cover ... NaN NaN NaN https://twitter.com/dog_rates/status/672481316... 12.0 10.0 Jazz NaN NaN pupper NaN
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 <a href="http://twitter.com/download/iphone" r... This is Rolf. He's having the time of his life... NaN NaN NaN https://twitter.com/dog_rates/status/672254177... 11.0 10.0 Rolf NaN NaN pupper NaN
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 <a href="http://twitter.com/download/iphone" r... This is Opal. He's a Royal John Coctostan. Rea... NaN NaN NaN https://twitter.com/dog_rates/status/672205392... 9.0 10.0 Opal NaN NaN pupper NaN
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 <a href="http://twitter.com/download/iphone" r... This is Bubba. He's a Titted Peebles Aorta. Ev... NaN NaN NaN https://twitter.com/dog_rates/status/672160042... 8.0 10.0 Bubba NaN NaN pupper NaN

332 rows × 17 columns

6. Columns pertaining to retweets and expanded URLs are unnecessary in df_doggo.

Code

In [41]:
df_doggo_2.drop(columns=['retweeted_status_id','retweeted_status_user_id', 'retweeted_status_timestamp', 'expanded_urls', 'source'], inplace=True)
/opt/conda/lib/python3.6/site-packages/pandas/core/frame.py:3697: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  errors=errors)

Test

In [42]:
df_doggo_2
Out[42]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp text rating_numerator rating_denominator name doggo floofer pupper puppo
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... 14.0 10.0 Cassie doggo NaN NaN NaN
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... 13.0 10.0 None NaN NaN NaN puppo
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... 13.0 10.0 Stuart NaN NaN NaN puppo
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... 12.0 10.0 Roscoe NaN NaN pupper NaN
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... 12.0 10.0 Yogi doggo NaN NaN NaN
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... 13.0 10.0 Grizzwald NaN floofer NaN NaN
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... 12.0 10.0 Gus NaN NaN pupper NaN
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... 14.0 10.0 a NaN NaN pupper NaN
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... 13.0 10.0 Snoopy NaN NaN NaN puppo
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... 12.0 10.0 Ginger NaN NaN pupper NaN
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... 13.0 10.0 Jed NaN NaN pupper NaN
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... 13.0 10.0 Sebastian NaN NaN NaN puppo
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... 12.0 10.0 Sierra NaN NaN pupper NaN
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... 12.0 10.0 None doggo NaN NaN NaN
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... 12.0 10.0 Rover NaN NaN pupper NaN
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... 12.0 10.0 Napolean doggo NaN NaN NaN
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH 14.0 10.0 None doggo NaN NaN NaN
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... 12.0 10.0 Scout doggo NaN NaN NaN
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... 12.0 10.0 Shikha NaN NaN NaN puppo
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... 13.0 10.0 Jamesy NaN NaN pupper NaN
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... 13.0 10.0 None NaN NaN NaN puppo
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... 13.0 10.0 None doggo NaN NaN NaN
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... 14.0 10.0 None NaN NaN pupper NaN
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... 12.0 10.0 Boomer NaN NaN pupper NaN
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... 13.0 10.0 Barney doggo NaN NaN NaN
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... 13.0 10.0 Mimosa doggo NaN NaN NaN
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... 12.0 10.0 Pickles NaN NaN pupper NaN
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... 12.0 10.0 None NaN NaN pupper NaN
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... 13.0 10.0 Clark NaN NaN pupper NaN
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... 12.0 10.0 Meera doggo NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 Meet Zuzu. He just graduated college. Astute p... 10.0 10.0 Zuzu NaN NaN pupper NaN
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... 10.0 10.0 Mollie NaN NaN pupper NaN
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... 11.0 10.0 Superpup NaN NaN pupper NaN
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... 10.0 10.0 Rufio NaN NaN pupper NaN
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... 12.0 10.0 None NaN NaN pupper NaN
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... 10.0 10.0 None NaN NaN pupper NaN
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 This is Lennon. He's in quite the predicament.... 8.0 10.0 Lennon NaN NaN pupper NaN
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... 9.0 10.0 Gus NaN NaN pupper NaN
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... 12.0 10.0 Kaiya NaN NaN pupper NaN
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... 10.0 10.0 one NaN NaN pupper NaN
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... 11.0 10.0 Obie NaN NaN pupper NaN
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... 10.0 10.0 Raymond NaN NaN pupper NaN
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 This is Pickles. She's a tiny pointy pupper. A... 8.0 10.0 Pickles NaN NaN pupper NaN
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... 10.0 10.0 Albert NaN NaN pupper NaN
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... 7.0 10.0 Jeffri NaN NaN pupper NaN
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 This little pupper can't wait for Christmas. H... 11.0 10.0 None NaN NaN pupper NaN
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... 10.0 10.0 Django NaN NaN pupper NaN
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... 8.0 10.0 Eve NaN NaN pupper NaN
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 This is Fletcher. He's had a ruff night. No mo... 8.0 10.0 Fletcher NaN NaN pupper NaN
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... 10.0 10.0 Schnozz NaN NaN pupper NaN
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... 10.0 10.0 Chuckles NaN NaN pupper NaN
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 This is Chet. He's having a hard time. Really ... 7.0 10.0 Chet NaN NaN pupper NaN
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 This is Cheryl AKA Queen Pupper of the Skies. ... 11.0 10.0 Cheryl NaN NaN pupper NaN
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... 12.0 10.0 None NaN NaN pupper NaN
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 This is Norman. Doesn't bark much. Very docile... 6.0 10.0 Norman NaN NaN pupper NaN
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... 9.0 10.0 Scott NaN NaN pupper NaN
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... 12.0 10.0 Jazz NaN NaN pupper NaN
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... 11.0 10.0 Rolf NaN NaN pupper NaN
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... 9.0 10.0 Opal NaN NaN pupper NaN
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... 8.0 10.0 Bubba NaN NaN pupper NaN

332 rows × 12 columns

7. Remove entries where p1_dog, p2_dog, and p3_dog are all "False" in df_image.

Code

In [43]:
df_image_1 = df_image.query('p1_dog == True or p2_dog == True or p3_dog == True')

Test

In [44]:
df_image_1.query('p1_dog == False & p2_dog == False & p3_dog == False')
Out[44]:
tweet_id jpg_url img_num p1 p1_conf p1_dog p2 p2_conf p2_dog p3 p3_conf p3_dog

8. Values for p1, p2, and p3 sometimes capitalized but not always in df_image.

Code

In [45]:
df_image_1.p1.str.lower()
Out[45]:
0            welsh_springer_spaniel
1                           redbone
2                   german_shepherd
3               rhodesian_ridgeback
4                miniature_pinscher
5              bernese_mountain_dog
7                              chow
8                     shopping_cart
9                  miniature_poodle
10                 golden_retriever
11                    gordon_setter
12                     walker_hound
13                              pug
14                       bloodhound
15                            lhasa
16                   english_setter
19                italian_greyhound
20                      maltese_dog
22                               ox
23                 golden_retriever
24                         malamute
26      soft-coated_wheaten_terrier
27                        chihuahua
28          black-and-tan_coonhound
30                      toy_terrier
31                 blenheim_spaniel
32                         pembroke
33                            llama
34         chesapeake_bay_retriever
35                        chihuahua
                   ...             
2042                            pug
2043               blenheim_spaniel
2044                            pug
2045                 french_bulldog
2047                         kuvasz
2048                      chihuahua
2049                        samoyed
2050               mexican_hairless
2051                       pembroke
2053                         basset
2054                 french_bulldog
2055                       pembroke
2056                 siberian_husky
2057               golden_retriever
2058               golden_retriever
2059                        whippet
2060               golden_retriever
2061                 french_bulldog
2062                       pembroke
2063                 french_bulldog
2064                        samoyed
2065                       pembroke
2066                  irish_terrier
2067                     pomeranian
2068                    appenzeller
2069       chesapeake_bay_retriever
2070                         basset
2071                    paper_towel
2072                      chihuahua
2073                      chihuahua
Name: p1, Length: 1751, dtype: object

Test

In [46]:
df_image_1
Out[46]:
tweet_id jpg_url img_num p1 p1_conf p1_dog p2 p2_conf p2_dog p3 p3_conf p3_dog
0 666020888022790149 https://pbs.twimg.com/media/CT4udn0WwAA0aMy.jpg 1 Welsh_springer_spaniel 0.465074 True collie 0.156665 True Shetland_sheepdog 0.061428 True
1 666029285002620928 https://pbs.twimg.com/media/CT42GRgUYAA5iDo.jpg 1 redbone 0.506826 True miniature_pinscher 0.074192 True Rhodesian_ridgeback 0.072010 True
2 666033412701032449 https://pbs.twimg.com/media/CT4521TWwAEvMyu.jpg 1 German_shepherd 0.596461 True malinois 0.138584 True bloodhound 0.116197 True
3 666044226329800704 https://pbs.twimg.com/media/CT5Dr8HUEAA-lEu.jpg 1 Rhodesian_ridgeback 0.408143 True redbone 0.360687 True miniature_pinscher 0.222752 True
4 666049248165822465 https://pbs.twimg.com/media/CT5IQmsXIAAKY4A.jpg 1 miniature_pinscher 0.560311 True Rottweiler 0.243682 True Doberman 0.154629 True
5 666050758794694657 https://pbs.twimg.com/media/CT5Jof1WUAEuVxN.jpg 1 Bernese_mountain_dog 0.651137 True English_springer 0.263788 True Greater_Swiss_Mountain_dog 0.016199 True
7 666055525042405380 https://pbs.twimg.com/media/CT5N9tpXIAAifs1.jpg 1 chow 0.692517 True Tibetan_mastiff 0.058279 True fur_coat 0.054449 False
8 666057090499244032 https://pbs.twimg.com/media/CT5PY90WoAAQGLo.jpg 1 shopping_cart 0.962465 False shopping_basket 0.014594 False golden_retriever 0.007959 True
9 666058600524156928 https://pbs.twimg.com/media/CT5Qw94XAAA_2dP.jpg 1 miniature_poodle 0.201493 True komondor 0.192305 True soft-coated_wheaten_terrier 0.082086 True
10 666063827256086533 https://pbs.twimg.com/media/CT5Vg_wXIAAXfnj.jpg 1 golden_retriever 0.775930 True Tibetan_mastiff 0.093718 True Labrador_retriever 0.072427 True
11 666071193221509120 https://pbs.twimg.com/media/CT5cN_3WEAAlOoZ.jpg 1 Gordon_setter 0.503672 True Yorkshire_terrier 0.174201 True Pekinese 0.109454 True
12 666073100786774016 https://pbs.twimg.com/media/CT5d9DZXAAALcwe.jpg 1 Walker_hound 0.260857 True English_foxhound 0.175382 True Ibizan_hound 0.097471 True
13 666082916733198337 https://pbs.twimg.com/media/CT5m4VGWEAAtKc8.jpg 1 pug 0.489814 True bull_mastiff 0.404722 True French_bulldog 0.048960 True
14 666094000022159362 https://pbs.twimg.com/media/CT5w9gUW4AAsBNN.jpg 1 bloodhound 0.195217 True German_shepherd 0.078260 True malinois 0.075628 True
15 666099513787052032 https://pbs.twimg.com/media/CT51-JJUEAA6hV8.jpg 1 Lhasa 0.582330 True Shih-Tzu 0.166192 True Dandie_Dinmont 0.089688 True
16 666102155909144576 https://pbs.twimg.com/media/CT54YGiWUAEZnoK.jpg 1 English_setter 0.298617 True Newfoundland 0.149842 True borzoi 0.133649 True
19 666273097616637952 https://pbs.twimg.com/media/CT8T1mtUwAA3aqm.jpg 1 Italian_greyhound 0.176053 True toy_terrier 0.111884 True basenji 0.111152 True
20 666287406224695296 https://pbs.twimg.com/media/CT8g3BpUEAAuFjg.jpg 1 Maltese_dog 0.857531 True toy_poodle 0.063064 True miniature_poodle 0.025581 True
22 666337882303524864 https://pbs.twimg.com/media/CT9OwFIWEAMuRje.jpg 1 ox 0.416669 False Newfoundland 0.278407 True groenendael 0.102643 True
23 666345417576210432 https://pbs.twimg.com/media/CT9Vn7PWoAA_ZCM.jpg 1 golden_retriever 0.858744 True Chesapeake_Bay_retriever 0.054787 True Labrador_retriever 0.014241 True
24 666353288456101888 https://pbs.twimg.com/media/CT9cx0tUEAAhNN_.jpg 1 malamute 0.336874 True Siberian_husky 0.147655 True Eskimo_dog 0.093412 True
26 666373753744588802 https://pbs.twimg.com/media/CT9vZEYWUAAlZ05.jpg 1 soft-coated_wheaten_terrier 0.326467 True Afghan_hound 0.259551 True briard 0.206803 True
27 666396247373291520 https://pbs.twimg.com/media/CT-D2ZHWIAA3gK1.jpg 1 Chihuahua 0.978108 True toy_terrier 0.009397 True papillon 0.004577 True
28 666407126856765440 https://pbs.twimg.com/media/CT-NvwmW4AAugGZ.jpg 1 black-and-tan_coonhound 0.529139 True bloodhound 0.244220 True flat-coated_retriever 0.173810 True
30 666418789513326592 https://pbs.twimg.com/media/CT-YWb7U8AA7QnN.jpg 1 toy_terrier 0.149680 True papillon 0.148258 True Chihuahua 0.142860 True
31 666421158376562688 https://pbs.twimg.com/media/CT-aggCXAAIMfT3.jpg 1 Blenheim_spaniel 0.906777 True cocker_spaniel 0.090346 True Shih-Tzu 0.001117 True
32 666428276349472768 https://pbs.twimg.com/media/CT-g-0DUwAEQdSn.jpg 1 Pembroke 0.371361 True chow 0.249394 True Pomeranian 0.241878 True
33 666430724426358785 https://pbs.twimg.com/media/CT-jNYqW4AAPi2M.jpg 1 llama 0.505184 False Irish_terrier 0.104109 True dingo 0.062071 False
34 666435652385423360 https://pbs.twimg.com/media/CT-nsTQWEAEkyDn.jpg 1 Chesapeake_Bay_retriever 0.184130 True chain_saw 0.056775 False power_drill 0.036763 False
35 666437273139982337 https://pbs.twimg.com/media/CT-pKmRWIAAxUWj.jpg 1 Chihuahua 0.671853 True beagle 0.124680 True Saluki 0.044094 True
... ... ... ... ... ... ... ... ... ... ... ... ...
2042 885528943205470208 https://pbs.twimg.com/media/DEoH3yvXgAAzQtS.jpg 1 pug 0.369275 True Labrador_retriever 0.265835 True kuvasz 0.134697 True
2043 885984800019947520 https://pbs.twimg.com/media/DEumeWWV0AA-Z61.jpg 1 Blenheim_spaniel 0.972494 True Shih-Tzu 0.006630 True Bernese_mountain_dog 0.006239 True
2044 886258384151887873 https://pbs.twimg.com/media/DEyfTG4UMAE4aE9.jpg 1 pug 0.943575 True shower_cap 0.025286 False Siamese_cat 0.002849 False
2045 886366144734445568 https://pbs.twimg.com/media/DE0BTnQUwAApKEH.jpg 1 French_bulldog 0.999201 True Chihuahua 0.000361 True Boston_bull 0.000076 True
2047 886736880519319552 https://pbs.twimg.com/media/DE5Se8FXcAAJFx4.jpg 1 kuvasz 0.309706 True Great_Pyrenees 0.186136 True Dandie_Dinmont 0.086346 True
2048 886983233522544640 https://pbs.twimg.com/media/DE8yicJW0AAAvBJ.jpg 2 Chihuahua 0.793469 True toy_terrier 0.143528 True can_opener 0.032253 False
2049 887101392804085760 https://pbs.twimg.com/media/DE-eAq6UwAA-jaE.jpg 1 Samoyed 0.733942 True Eskimo_dog 0.035029 True Staffordshire_bullterrier 0.029705 True
2050 887343217045368832 https://pbs.twimg.com/ext_tw_video_thumb/88734... 1 Mexican_hairless 0.330741 True sea_lion 0.275645 False Weimaraner 0.134203 True
2051 887473957103951883 https://pbs.twimg.com/media/DFDw2tyUQAAAFke.jpg 2 Pembroke 0.809197 True Rhodesian_ridgeback 0.054950 True beagle 0.038915 True
2053 887705289381826560 https://pbs.twimg.com/media/DFHDQBbXgAEqY7t.jpg 1 basset 0.821664 True redbone 0.087582 True Weimaraner 0.026236 True
2054 888078434458587136 https://pbs.twimg.com/media/DFMWn56WsAAkA7B.jpg 1 French_bulldog 0.995026 True pug 0.000932 True bull_mastiff 0.000903 True
2055 888202515573088257 https://pbs.twimg.com/media/DFDw2tyUQAAAFke.jpg 2 Pembroke 0.809197 True Rhodesian_ridgeback 0.054950 True beagle 0.038915 True
2056 888554962724278272 https://pbs.twimg.com/media/DFTH_O-UQAACu20.jpg 3 Siberian_husky 0.700377 True Eskimo_dog 0.166511 True malamute 0.111411 True
2057 888804989199671297 https://pbs.twimg.com/media/DFWra-3VYAA2piG.jpg 1 golden_retriever 0.469760 True Labrador_retriever 0.184172 True English_setter 0.073482 True
2058 888917238123831296 https://pbs.twimg.com/media/DFYRgsOUQAARGhO.jpg 1 golden_retriever 0.714719 True Tibetan_mastiff 0.120184 True Labrador_retriever 0.105506 True
2059 889278841981685760 https://pbs.twimg.com/ext_tw_video_thumb/88927... 1 whippet 0.626152 True borzoi 0.194742 True Saluki 0.027351 True
2060 889531135344209921 https://pbs.twimg.com/media/DFg_2PVW0AEHN3p.jpg 1 golden_retriever 0.953442 True Labrador_retriever 0.013834 True redbone 0.007958 True
2061 889638837579907072 https://pbs.twimg.com/media/DFihzFfXsAYGDPR.jpg 1 French_bulldog 0.991650 True boxer 0.002129 True Staffordshire_bullterrier 0.001498 True
2062 889665388333682689 https://pbs.twimg.com/media/DFi579UWsAAatzw.jpg 1 Pembroke 0.966327 True Cardigan 0.027356 True basenji 0.004633 True
2063 889880896479866881 https://pbs.twimg.com/media/DFl99B1WsAITKsg.jpg 1 French_bulldog 0.377417 True Labrador_retriever 0.151317 True muzzle 0.082981 False
2064 890006608113172480 https://pbs.twimg.com/media/DFnwSY4WAAAMliS.jpg 1 Samoyed 0.957979 True Pomeranian 0.013884 True chow 0.008167 True
2065 890240255349198849 https://pbs.twimg.com/media/DFrEyVuW0AAO3t9.jpg 1 Pembroke 0.511319 True Cardigan 0.451038 True Chihuahua 0.029248 True
2066 890609185150312448 https://pbs.twimg.com/media/DFwUU__XcAEpyXI.jpg 1 Irish_terrier 0.487574 True Irish_setter 0.193054 True Chesapeake_Bay_retriever 0.118184 True
2067 890729181411237888 https://pbs.twimg.com/media/DFyBahAVwAAhUTd.jpg 2 Pomeranian 0.566142 True Eskimo_dog 0.178406 True Pembroke 0.076507 True
2068 890971913173991426 https://pbs.twimg.com/media/DF1eOmZXUAALUcq.jpg 1 Appenzeller 0.341703 True Border_collie 0.199287 True ice_lolly 0.193548 False
2069 891087950875897856 https://pbs.twimg.com/media/DF3HwyEWsAABqE6.jpg 1 Chesapeake_Bay_retriever 0.425595 True Irish_terrier 0.116317 True Indian_elephant 0.076902 False
2070 891327558926688256 https://pbs.twimg.com/media/DF6hr6BUMAAzZgT.jpg 2 basset 0.555712 True English_springer 0.225770 True German_short-haired_pointer 0.175219 True
2071 891689557279858688 https://pbs.twimg.com/media/DF_q7IAWsAEuuN8.jpg 1 paper_towel 0.170278 False Labrador_retriever 0.168086 True spatula 0.040836 False
2072 891815181378084864 https://pbs.twimg.com/media/DGBdLU1WsAANxJ9.jpg 1 Chihuahua 0.716012 True malamute 0.078253 True kelpie 0.031379 True
2073 892177421306343426 https://pbs.twimg.com/media/DGGmoV4XsAAUL6n.jpg 1 Chihuahua 0.323581 True Pekinese 0.090647 True papillon 0.068957 True

1751 rows × 12 columns

9. All columns in df_tweet_data should be integers.

  • This was completed while assessing data in order to properly assess the data.

Code

df_tweet_data was converted to an integer in the Assess Data section using the following code: df_tweet_data = df_tweet_data.astype(str).astype(int)

Test

In [47]:
df_tweet_data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2339 entries, 0 to 2338
Data columns (total 3 columns):
tweet_id     2339 non-null int64
retweets     2339 non-null int64
favorites    2339 non-null int64
dtypes: int64(3)
memory usage: 54.9 KB

10. 167 rows missing data for favorites in df_tweet_data.

Code

In [48]:
df_tweet_data_1 = df_tweet_data.query('favorites != "0"')

Test

In [49]:
df_tweet_data_1.query('favorites == "0"')
Out[49]:
tweet_id retweets favorites

Tidiness Issues

1. Doggo, floofer, pupper, puppo are one variable spread across different columns in df_doggo.

Code

In [50]:
df_doggo_2['doggo'] = df_doggo_2['doggo'].fillna(df_doggo_2['floofer'])
df_doggo_2['doggo'] = df_doggo_2['doggo'].fillna(df_doggo_2['pupper'])
df_doggo_2['doggo'] = df_doggo_2['doggo'].fillna(df_doggo_2['puppo'])
df_doggo_2.drop(columns=['floofer','pupper', 'puppo'], inplace=True)
df_doggo_2
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:1: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  """Entry point for launching an IPython kernel.
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:2: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  
/opt/conda/lib/python3.6/site-packages/ipykernel_launcher.py:3: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  This is separate from the ipykernel package so we can avoid doing imports until
/opt/conda/lib/python3.6/site-packages/pandas/core/frame.py:3697: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  errors=errors)
Out[50]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp text rating_numerator rating_denominator name doggo
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... 14.0 10.0 Cassie doggo
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... 13.0 10.0 None puppo
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... 13.0 10.0 Stuart puppo
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... 12.0 10.0 Roscoe pupper
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... 12.0 10.0 Yogi doggo
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... 13.0 10.0 Grizzwald floofer
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... 12.0 10.0 Gus pupper
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... 14.0 10.0 a pupper
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... 13.0 10.0 Snoopy puppo
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... 12.0 10.0 Ginger pupper
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... 13.0 10.0 Jed pupper
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... 13.0 10.0 Sebastian puppo
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... 12.0 10.0 Sierra pupper
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... 12.0 10.0 None doggo
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... 12.0 10.0 Rover pupper
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... 12.0 10.0 Napolean doggo
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH 14.0 10.0 None doggo
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... 12.0 10.0 Scout doggo
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... 12.0 10.0 Shikha puppo
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... 13.0 10.0 Jamesy pupper
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... 13.0 10.0 None puppo
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... 13.0 10.0 None doggo
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... 14.0 10.0 None pupper
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... 12.0 10.0 Boomer pupper
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... 13.0 10.0 Barney doggo
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... 13.0 10.0 Mimosa doggo
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... 12.0 10.0 Pickles pupper
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... 12.0 10.0 None pupper
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... 13.0 10.0 Clark pupper
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... 12.0 10.0 Meera doggo
... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 Meet Zuzu. He just graduated college. Astute p... 10.0 10.0 Zuzu pupper
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... 10.0 10.0 Mollie pupper
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... 11.0 10.0 Superpup pupper
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... 10.0 10.0 Rufio pupper
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... 12.0 10.0 None pupper
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... 10.0 10.0 None pupper
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 This is Lennon. He's in quite the predicament.... 8.0 10.0 Lennon pupper
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... 9.0 10.0 Gus pupper
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... 12.0 10.0 Kaiya pupper
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... 10.0 10.0 one pupper
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... 11.0 10.0 Obie pupper
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... 10.0 10.0 Raymond pupper
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 This is Pickles. She's a tiny pointy pupper. A... 8.0 10.0 Pickles pupper
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... 10.0 10.0 Albert pupper
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... 7.0 10.0 Jeffri pupper
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 This little pupper can't wait for Christmas. H... 11.0 10.0 None pupper
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... 10.0 10.0 Django pupper
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... 8.0 10.0 Eve pupper
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 This is Fletcher. He's had a ruff night. No mo... 8.0 10.0 Fletcher pupper
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... 10.0 10.0 Schnozz pupper
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... 10.0 10.0 Chuckles pupper
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 This is Chet. He's having a hard time. Really ... 7.0 10.0 Chet pupper
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 This is Cheryl AKA Queen Pupper of the Skies. ... 11.0 10.0 Cheryl pupper
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... 12.0 10.0 None pupper
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 This is Norman. Doesn't bark much. Very docile... 6.0 10.0 Norman pupper
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... 9.0 10.0 Scott pupper
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... 12.0 10.0 Jazz pupper
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... 11.0 10.0 Rolf pupper
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... 9.0 10.0 Opal pupper
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... 8.0 10.0 Bubba pupper

332 rows × 9 columns

In [51]:
df_doggo_2 = df_doggo_2.rename(index=str, columns={"doggo": "dog_stages"})

Test

In [52]:
df_doggo_2
Out[52]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp text rating_numerator rating_denominator name dog_stages
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... 14.0 10.0 Cassie doggo
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... 13.0 10.0 None puppo
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... 13.0 10.0 Stuart puppo
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... 12.0 10.0 Roscoe pupper
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... 12.0 10.0 Yogi doggo
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... 13.0 10.0 Grizzwald floofer
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... 12.0 10.0 Gus pupper
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... 14.0 10.0 a pupper
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... 13.0 10.0 Snoopy puppo
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... 12.0 10.0 Ginger pupper
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... 13.0 10.0 Jed pupper
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... 13.0 10.0 Sebastian puppo
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... 12.0 10.0 Sierra pupper
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... 12.0 10.0 None doggo
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... 12.0 10.0 Rover pupper
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... 12.0 10.0 Napolean doggo
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH 14.0 10.0 None doggo
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... 12.0 10.0 Scout doggo
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... 12.0 10.0 Shikha puppo
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... 13.0 10.0 Jamesy pupper
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... 13.0 10.0 None puppo
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... 13.0 10.0 None doggo
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... 14.0 10.0 None pupper
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... 12.0 10.0 Boomer pupper
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... 13.0 10.0 Barney doggo
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... 13.0 10.0 Mimosa doggo
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... 12.0 10.0 Pickles pupper
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... 12.0 10.0 None pupper
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... 13.0 10.0 Clark pupper
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... 12.0 10.0 Meera doggo
... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 Meet Zuzu. He just graduated college. Astute p... 10.0 10.0 Zuzu pupper
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... 10.0 10.0 Mollie pupper
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... 11.0 10.0 Superpup pupper
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... 10.0 10.0 Rufio pupper
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... 12.0 10.0 None pupper
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... 10.0 10.0 None pupper
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 This is Lennon. He's in quite the predicament.... 8.0 10.0 Lennon pupper
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... 9.0 10.0 Gus pupper
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... 12.0 10.0 Kaiya pupper
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... 10.0 10.0 one pupper
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... 11.0 10.0 Obie pupper
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... 10.0 10.0 Raymond pupper
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 This is Pickles. She's a tiny pointy pupper. A... 8.0 10.0 Pickles pupper
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... 10.0 10.0 Albert pupper
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... 7.0 10.0 Jeffri pupper
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 This little pupper can't wait for Christmas. H... 11.0 10.0 None pupper
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... 10.0 10.0 Django pupper
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... 8.0 10.0 Eve pupper
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 This is Fletcher. He's had a ruff night. No mo... 8.0 10.0 Fletcher pupper
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... 10.0 10.0 Schnozz pupper
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... 10.0 10.0 Chuckles pupper
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 This is Chet. He's having a hard time. Really ... 7.0 10.0 Chet pupper
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 This is Cheryl AKA Queen Pupper of the Skies. ... 11.0 10.0 Cheryl pupper
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... 12.0 10.0 None pupper
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 This is Norman. Doesn't bark much. Very docile... 6.0 10.0 Norman pupper
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... 9.0 10.0 Scott pupper
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... 12.0 10.0 Jazz pupper
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... 11.0 10.0 Rolf pupper
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... 9.0 10.0 Opal pupper
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... 8.0 10.0 Bubba pupper

332 rows × 9 columns

2. rating_numerator and rating_denominator can be combined into one column in df_doggo.

Code

In [53]:
df_doggo_2['rating_percent'] = df_doggo_2.rating_numerator/df_doggo_2.rating_denominator
df_doggo_2
Out[53]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp text rating_numerator rating_denominator name dog_stages rating_percent
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... 14.0 10.0 Cassie doggo 1.4
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... 13.0 10.0 None puppo 1.3
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... 13.0 10.0 Stuart puppo 1.3
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... 12.0 10.0 Roscoe pupper 1.2
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... 12.0 10.0 Yogi doggo 1.2
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... 13.0 10.0 Grizzwald floofer 1.3
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... 12.0 10.0 Gus pupper 1.2
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... 14.0 10.0 a pupper 1.4
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... 13.0 10.0 Snoopy puppo 1.3
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... 12.0 10.0 Ginger pupper 1.2
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... 13.0 10.0 Jed pupper 1.3
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... 13.0 10.0 Sebastian puppo 1.3
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... 12.0 10.0 Sierra pupper 1.2
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... 12.0 10.0 None doggo 1.2
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... 12.0 10.0 Rover pupper 1.2
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... 12.0 10.0 Napolean doggo 1.2
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH 14.0 10.0 None doggo 1.4
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... 12.0 10.0 Scout doggo 1.2
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... 12.0 10.0 Shikha puppo 1.2
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... 13.0 10.0 Jamesy pupper 1.3
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... 13.0 10.0 None puppo 1.3
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... 13.0 10.0 None doggo 1.3
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... 14.0 10.0 None pupper 1.4
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... 12.0 10.0 Boomer pupper 1.2
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... 13.0 10.0 Barney doggo 1.3
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... 13.0 10.0 Mimosa doggo 1.3
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... 12.0 10.0 Pickles pupper 1.2
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... 12.0 10.0 None pupper 1.2
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... 13.0 10.0 Clark pupper 1.3
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... 12.0 10.0 Meera doggo 1.2
... ... ... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 Meet Zuzu. He just graduated college. Astute p... 10.0 10.0 Zuzu pupper 1.0
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... 10.0 10.0 Mollie pupper 1.0
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... 11.0 10.0 Superpup pupper 1.1
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... 10.0 10.0 Rufio pupper 1.0
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... 12.0 10.0 None pupper 1.2
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... 10.0 10.0 None pupper 1.0
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 This is Lennon. He's in quite the predicament.... 8.0 10.0 Lennon pupper 0.8
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... 9.0 10.0 Gus pupper 0.9
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... 12.0 10.0 Kaiya pupper 1.2
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... 10.0 10.0 one pupper 1.0
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... 11.0 10.0 Obie pupper 1.1
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... 10.0 10.0 Raymond pupper 1.0
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 This is Pickles. She's a tiny pointy pupper. A... 8.0 10.0 Pickles pupper 0.8
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... 10.0 10.0 Albert pupper 1.0
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... 7.0 10.0 Jeffri pupper 0.7
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 This little pupper can't wait for Christmas. H... 11.0 10.0 None pupper 1.1
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... 10.0 10.0 Django pupper 1.0
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... 8.0 10.0 Eve pupper 0.8
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 This is Fletcher. He's had a ruff night. No mo... 8.0 10.0 Fletcher pupper 0.8
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... 10.0 10.0 Schnozz pupper 1.0
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... 10.0 10.0 Chuckles pupper 1.0
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 This is Chet. He's having a hard time. Really ... 7.0 10.0 Chet pupper 0.7
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 This is Cheryl AKA Queen Pupper of the Skies. ... 11.0 10.0 Cheryl pupper 1.1
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... 12.0 10.0 None pupper 1.2
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 This is Norman. Doesn't bark much. Very docile... 6.0 10.0 Norman pupper 0.6
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... 9.0 10.0 Scott pupper 0.9
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... 12.0 10.0 Jazz pupper 1.2
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... 11.0 10.0 Rolf pupper 1.1
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... 9.0 10.0 Opal pupper 0.9
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... 8.0 10.0 Bubba pupper 0.8

332 rows × 10 columns

In [54]:
df_doggo_2.drop(columns=['rating_numerator','rating_denominator'], inplace=True)

Test

In [55]:
df_doggo_2
Out[55]:
tweet_id in_reply_to_status_id in_reply_to_user_id timestamp text name dog_stages rating_percent
9 890240255349198849 NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... Cassie doggo 1.4
12 889665388333682689 NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... None puppo 1.3
14 889531135344209921 NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... Stuart puppo 1.3
29 886366144734445568 NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... Roscoe pupper 1.2
43 884162670584377345 NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... Yogi doggo 1.2
46 883360690899218434 NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... Grizzwald floofer 1.3
49 882762694511734784 NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... Gus pupper 1.2
56 881536004380872706 NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... a pupper 1.4
71 878776093423087618 NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... Snoopy puppo 1.3
82 876838120628539392 NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... Ginger pupper 1.2
92 874296783580663808 NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... Jed pupper 1.3
94 874012996292530176 NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... Sebastian puppo 1.3
98 873213775632977920 NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... Sierra pupper 1.2
99 872967104147763200 NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... None doggo 1.2
107 871762521631449091 NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... Rover pupper 1.2
108 871515927908634625 NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... Napolean doggo 1.2
110 871102520638267392 NaN NaN 2017-06-03 20:33:19 +0000 Never doubt a doggo 14/10 https://t.co/AbBLh2FZCH None doggo 1.4
121 869596645499047938 NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... Scout doggo 1.2
129 867421006826221569 NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... Shikha puppo 1.2
135 866450705531457537 NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... Jamesy pupper 1.3
168 859607811541651456 NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... None puppo 1.3
172 858843525470990336 NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... None doggo 1.3
199 854120357044912130 NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... None pupper 1.4
220 850019790995546112 NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... Boomer pupper 1.2
240 846514051647705089 NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... Barney doggo 1.3
248 845397057150107648 NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... Mimosa doggo 1.3
249 845306882940190720 NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... Pickles pupper 1.2
293 837820167694528512 NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... None pupper 1.2
297 837110210464448512 NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... Clark pupper 1.3
300 836753516572119041 NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... Meera doggo 1.2
... ... ... ... ... ... ... ... ...
1875 675113801096802304 NaN NaN 2015-12-11 00:44:07 +0000 Meet Zuzu. He just graduated college. Astute p... Zuzu pupper 1.0
1880 675006312288268288 NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... Mollie pupper 1.0
1889 674774481756377088 NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... Superpup pupper 1.1
1897 674737130913071104 NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... Rufio pupper 1.0
1903 674638615994089473 NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... None pupper 1.2
1907 674447403907457024 NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... None pupper 1.0
1915 674318007229923329 NaN NaN 2015-12-08 20:01:55 +0000 This is Lennon. He's in quite the predicament.... Lennon pupper 0.8
1921 674262580978937856 NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... Gus pupper 0.9
1930 674038233588723717 NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... Kaiya pupper 1.2
1936 673956914389192708 NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... one pupper 1.0
1937 673919437611909120 NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... Obie pupper 1.1
1945 673707060090052608 NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... Raymond pupper 1.0
1948 673697980713705472 NaN NaN 2015-12-07 02:58:09 +0000 This is Pickles. She's a tiny pointy pupper. A... Pickles pupper 0.8
1954 673656262056419329 NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... Albert pupper 1.0
1956 673612854080196609 NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... Jeffri pupper 0.7
1960 673363615379013632 NaN NaN 2015-12-06 04:49:31 +0000 This little pupper can't wait for Christmas. H... None pupper 1.1
1967 673342308415348736 NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... Django pupper 1.0
1970 673295268553605120 NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... Eve pupper 0.8
1974 673148804208660480 NaN NaN 2015-12-05 14:35:56 +0000 This is Fletcher. He's had a ruff night. No mo... Fletcher pupper 0.8
1977 672988786805112832 NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... Schnozz pupper 1.0
1980 672975131468300288 NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... Chuckles pupper 1.0
1981 672970152493887488 NaN NaN 2015-12-05 02:46:02 +0000 This is Chet. He's having a hard time. Really ... Chet pupper 0.7
1985 672898206762672129 NaN NaN 2015-12-04 22:00:08 +0000 This is Cheryl AKA Queen Pupper of the Skies. ... Cheryl pupper 1.1
1991 672622327801233409 NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... None pupper 1.2
1992 672614745925664768 NaN NaN 2015-12-04 03:13:46 +0000 This is Norman. Doesn't bark much. Very docile... Norman pupper 0.6
1995 672594978741354496 NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... Scott pupper 0.9
2002 672481316919734272 NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... Jazz pupper 1.2
2009 672254177670729728 NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... Rolf pupper 1.1
2015 672205392827572224 NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... Opal pupper 0.9
2017 672160042234327040 NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... Bubba pupper 0.8

332 rows × 8 columns

3. Combine dataframes by tweet_id

In [56]:
df_merge = pd.merge(df_image_1, df_doggo_2, on=['tweet_id'])
df_merge
Out[56]:
tweet_id jpg_url img_num p1 p1_conf p1_dog p2 p2_conf p2_dog p3 p3_conf p3_dog in_reply_to_status_id in_reply_to_user_id timestamp text name dog_stages rating_percent
0 672160042234327040 https://pbs.twimg.com/media/CVP9_beUEAAwURR.jpg 1 pug 0.561027 True French_bulldog 0.222114 True Labrador_retriever 0.065456 True NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... Bubba pupper 0.8
1 672205392827572224 https://pbs.twimg.com/media/CVQnPMrVAAAzShR.jpg 1 carton 0.952613 False crate 0.035376 False pug 0.003267 True NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... Opal pupper 0.9
2 672254177670729728 https://pbs.twimg.com/media/CVRTmz1WcAA4uMF.jpg 1 pug 0.979487 True French_bulldog 0.016850 True Norwegian_elkhound 0.001618 True NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... Rolf pupper 1.1
3 672481316919734272 https://pbs.twimg.com/media/CVUiMUeW4AEQgkU.jpg 1 Border_collie 0.599454 True collie 0.106227 True Shetland_sheepdog 0.094465 True NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... Jazz pupper 1.2
4 672594978741354496 https://pbs.twimg.com/media/CVWJkJXWsAInlZl.jpg 1 Great_Pyrenees 0.755945 True Old_English_sheepdog 0.082337 True Afghan_hound 0.027037 True NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... Scott pupper 0.9
5 672622327801233409 https://pbs.twimg.com/media/CVWicBbUYAIomjC.jpg 1 golden_retriever 0.952773 True Labrador_retriever 0.010835 True clumber 0.008786 True NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... None pupper 1.2
6 672975131468300288 https://pbs.twimg.com/media/CVbjRSIWsAElw2s.jpg 1 pug 0.836421 True Brabancon_griffon 0.044668 True French_bulldog 0.036570 True NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... Chuckles pupper 1.0
7 672988786805112832 https://pbs.twimg.com/media/CVbvjKqW4AA_CuD.jpg 1 Lakeland_terrier 0.836632 True West_Highland_white_terrier 0.073900 True wire-haired_fox_terrier 0.038160 True NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... Schnozz pupper 1.0
8 673295268553605120 https://pbs.twimg.com/media/CVgGc9hWIAIe1bn.jpg 1 golden_retriever 0.889241 True Labrador_retriever 0.064683 True Great_Pyrenees 0.012613 True NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... Eve pupper 0.8
9 673342308415348736 https://pbs.twimg.com/media/CVgxQc5XIAAYL0W.jpg 1 ski_mask 0.981017 False Chihuahua 0.013559 True kelpie 0.000652 True NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... Django pupper 1.0
10 673612854080196609 https://pbs.twimg.com/media/CVknUTlVEAARjU5.jpg 1 Newfoundland 0.223101 True Leonberg 0.111106 True shovel 0.085626 False NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... Jeffri pupper 0.7
11 673656262056419329 https://pbs.twimg.com/media/CVlOy3pW4AQ9H1K.jpg 1 bull_mastiff 0.700625 True Rhodesian_ridgeback 0.094698 True Brabancon_griffon 0.057559 True NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... Albert pupper 1.0
12 673707060090052608 https://pbs.twimg.com/media/CVl8_EPWoAAcuSC.jpg 1 German_short-haired_pointer 0.935771 True kelpie 0.022561 True Labrador_retriever 0.008847 True NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... Raymond pupper 1.0
13 673919437611909120 https://pbs.twimg.com/media/CVo-JuMWwAAet6F.jpg 1 jack-o'-lantern 0.172079 False schipperke 0.115984 True miniature_pinscher 0.052175 True NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... Obie pupper 1.1
14 673956914389192708 https://pbs.twimg.com/media/CVpgPGwWoAEV7gG.jpg 1 pug 0.586161 True Brabancon_griffon 0.082744 True Chihuahua 0.045878 True NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... one pupper 1.0
15 674038233588723717 https://pbs.twimg.com/media/CVqqMtiVEAEye_L.jpg 1 Eskimo_dog 0.358459 True Norwegian_elkhound 0.206963 True malamute 0.148236 True NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... Kaiya pupper 1.2
16 674262580978937856 https://pbs.twimg.com/media/CVt2PawWIAEUkqW.jpg 1 Greater_Swiss_Mountain_dog 0.519428 True boxer 0.121500 True Staffordshire_bullterrier 0.114498 True NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... Gus pupper 0.9
17 674447403907457024 https://pbs.twimg.com/media/CVweVUfW4AACPwI.jpg 1 Brabancon_griffon 0.409909 True malinois 0.244649 True bull_mastiff 0.074820 True NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... None pupper 1.0
18 674638615994089473 https://pbs.twimg.com/media/CVzMPh1UsAELQ_p.jpg 1 Pomeranian 0.846986 True chow 0.142014 True keeshond 0.002605 True NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... None pupper 1.2
19 674737130913071104 https://pbs.twimg.com/media/CV0l10AU8AAfg-a.jpg 1 Pomeranian 0.948537 True schipperke 0.014310 True Chihuahua 0.008120 True NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... Rufio pupper 1.0
20 674774481756377088 https://pbs.twimg.com/media/CV1HztsWoAAuZwo.jpg 1 Chihuahua 0.407016 True French_bulldog 0.309978 True Siamese_cat 0.227677 False NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... Superpup pupper 1.1
21 675006312288268288 https://pbs.twimg.com/media/CV4aqCwWsAIi3OP.jpg 1 boxer 0.654697 True space_heater 0.043389 False beagle 0.042848 True NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... Mollie pupper 1.0
22 675334060156301312 https://pbs.twimg.com/media/CV9EvZNUwAAgLCK.jpg 2 Pembroke 0.773135 True Cardigan 0.116810 True chow 0.039036 True NaN NaN 2015-12-11 15:19:21 +0000 Good morning here's a grass pupper. 12/10 http... None pupper 1.2
23 675740360753160193 https://pbs.twimg.com/ext_tw_video_thumb/67574... 1 golden_retriever 0.800495 True kuvasz 0.097756 True Saluki 0.068415 True NaN NaN 2015-12-12 18:13:51 +0000 Here's a pupper licking in slow motion. 12/10 ... None pupper 1.2
24 675845657354215424 https://pbs.twimg.com/media/CWEWClfW4AAnqhG.jpg 1 pug 0.883952 True Boston_bull 0.011057 True French_bulldog 0.009840 True NaN NaN 2015-12-13 01:12:15 +0000 This is Pepper. She's not fully comfortable ri... Pepper pupper 1.0
25 675898130735476737 https://pbs.twimg.com/media/CWFFt3_XIAArIYK.jpg 1 Labrador_retriever 0.407430 True malinois 0.077037 True pug 0.074597 True NaN NaN 2015-12-13 04:40:46 +0000 I'm sure you've all seen this pupper. Not prep... None pupper 1.0
26 676263575653122048 https://pbs.twimg.com/media/CWKSIfUUYAAiOBO.jpg 1 teddy 0.098283 False toy_poodle 0.098029 True shopping_basket 0.077852 False NaN NaN 2015-12-14 04:52:55 +0000 All this pupper wanted to do was go skiing. No... None pupper 1.0
27 676470639084101634 https://pbs.twimg.com/media/CWNOdIpWoAAWid2.jpg 1 golden_retriever 0.790386 True borzoi 0.022885 True dingo 0.015343 False NaN NaN 2015-12-14 18:35:43 +0000 Three generations of pupper. 11/10 for all htt... None pupper 1.1
28 676575501977128964 https://pbs.twimg.com/media/CWOt07EUsAAnOYW.jpg 1 feather_boa 0.424106 False Yorkshire_terrier 0.073144 True Shetland_sheepdog 0.057598 True NaN NaN 2015-12-15 01:32:24 +0000 This pupper is very passionate about Christmas... None pupper 0.8
29 676603393314578432 https://pbs.twimg.com/media/CWPHMqKVAAAE78E.jpg 1 whippet 0.877021 True Great_Dane 0.034182 True boxer 0.028404 True NaN NaN 2015-12-15 03:23:14 +0000 This is Godzilla pupper. He had a ruff childho... Godzilla pupper 0.9
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
220 834574053763584002 https://pbs.twimg.com/media/C5UAqgyXAAAbMWH.jpg 1 toilet_tissue 0.262936 False golden_retriever 0.226564 True bathtub 0.078879 False NaN NaN 2017-02-23 01:22:14 +0000 Here's a doggo fully pupared for a shower. H*c... None doggo 1.3
221 836753516572119041 https://pbs.twimg.com/media/C5y-4VwWcAIcaoj.jpg 1 mortarboard 0.936882 False academic_gown 0.020815 False schipperke 0.011564 True NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... Meera doggo 1.2
222 837110210464448512 https://pbs.twimg.com/media/C54DS1kXQAEU5pS.jpg 1 Siberian_husky 0.767696 True Eskimo_dog 0.217079 True malamute 0.011657 True NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... Clark pupper 1.3
223 837820167694528512 https://pbs.twimg.com/media/C6CI_jbVAAA3-a1.jpg 1 golden_retriever 0.887625 True Labrador_retriever 0.068718 True kuvasz 0.030387 True NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... None pupper 1.2
224 845306882940190720 https://pbs.twimg.com/media/C7siH5DXkAACnDT.jpg 1 Irish_water_spaniel 0.567475 True Labrador_retriever 0.169496 True curly-coated_retriever 0.101518 True NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... Pickles pupper 1.2
225 845397057150107648 https://pbs.twimg.com/media/C7t0IzLWkAINoft.jpg 1 Dandie_Dinmont 0.394404 True Maltese_dog 0.186537 True West_Highland_white_terrier 0.181985 True NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... Mimosa doggo 1.3
226 846514051647705089 https://pbs.twimg.com/media/C79sB4xXwAEvwKY.jpg 2 golden_retriever 0.650003 True Leonberg 0.065199 True Norfolk_terrier 0.052955 True NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... Barney doggo 1.3
227 850019790995546112 https://pbs.twimg.com/media/C8vgfTsXgAA561h.jpg 3 Shetland_sheepdog 0.759907 True collie 0.107405 True Pembroke 0.052335 True NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... Boomer pupper 1.2
228 854120357044912130 https://pbs.twimg.com/media/C9px7jyVwAAnmwN.jpg 4 black-and-tan_coonhound 0.854861 True Doberman 0.050792 True bluetick 0.021762 True NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... None pupper 1.4
229 858843525470990336 https://pbs.twimg.com/media/C-s5oYZXkAAMHHq.jpg 1 golden_retriever 0.578120 True Labrador_retriever 0.286059 True bloodhound 0.026917 True NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... None doggo 1.3
230 859607811541651456 https://pbs.twimg.com/media/C-3wvtxXcAUTuBE.jpg 1 golden_retriever 0.895529 True Irish_setter 0.024099 True Labrador_retriever 0.019285 True NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... None puppo 1.3
231 866450705531457537 https://pbs.twimg.com/media/DAZAUfBXcAAG_Nn.jpg 2 French_bulldog 0.905334 True Boston_bull 0.078060 True pug 0.001771 True NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... Jamesy pupper 1.3
232 867421006826221569 https://pbs.twimg.com/media/DAmyy8FXYAIH8Ty.jpg 1 Eskimo_dog 0.616457 True Siberian_husky 0.381330 True malamute 0.001670 True NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... Shikha puppo 1.2
233 869596645499047938 https://pbs.twimg.com/media/DBFtiYqWAAAsjj1.jpg 1 Chihuahua 0.955156 True toy_terrier 0.008054 True muzzle 0.006296 False NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... Scout doggo 1.2
234 871515927908634625 https://pbs.twimg.com/media/DBg_HT9WAAEeIMM.jpg 2 komondor 0.974781 True briard 0.020041 True swab 0.003228 False NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... Napolean doggo 1.2
235 871762521631449091 https://pbs.twimg.com/media/DBkfY58XcAEdzZy.jpg 2 Labrador_retriever 0.921393 True golden_retriever 0.064608 True bloodhound 0.003383 True NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... Rover pupper 1.2
236 872967104147763200 https://pbs.twimg.com/media/DB1m871XUAAw5vZ.jpg 2 Labrador_retriever 0.476913 True Chesapeake_Bay_retriever 0.174145 True German_short-haired_pointer 0.092861 True NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... None doggo 1.2
237 873213775632977920 https://pbs.twimg.com/media/DB5HTBGXUAE0TiK.jpg 1 vizsla 0.619782 True bloodhound 0.338069 True Chesapeake_Bay_retriever 0.012676 True NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... Sierra pupper 1.2
238 874012996292530176 https://pbs.twimg.com/media/DCEeLxjXsAAvNSM.jpg 2 Cardigan 0.806674 True Pembroke 0.116622 True kelpie 0.049182 True NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... Sebastian puppo 1.3
239 874296783580663808 https://pbs.twimg.com/media/DCIgSR0XgAANEOY.jpg 1 cocker_spaniel 0.437216 True miniature_poodle 0.277191 True toy_poodle 0.157402 True NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... Jed pupper 1.3
240 876838120628539392 https://pbs.twimg.com/media/DCsnnZsVwAEfkyi.jpg 1 bloodhound 0.575751 True redbone 0.240970 True Tibetan_mastiff 0.088935 True NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... Ginger pupper 1.2
241 878776093423087618 https://pbs.twimg.com/media/DDIKMXzW0AEibje.jpg 2 Italian_greyhound 0.734684 True whippet 0.150487 True Ibizan_hound 0.039725 True NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... Snoopy puppo 1.3
242 881536004380872706 https://pbs.twimg.com/ext_tw_video_thumb/88153... 1 Samoyed 0.281463 True Angora 0.272066 False Persian_cat 0.114854 False NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... a pupper 1.4
243 882762694511734784 https://pbs.twimg.com/media/DEAz_HHXsAA-p_z.jpg 1 Labrador_retriever 0.850050 True Chesapeake_Bay_retriever 0.074257 True flat-coated_retriever 0.015579 True NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... Gus pupper 1.2
244 883360690899218434 https://pbs.twimg.com/media/DEJT3FeXoAAtwUy.jpg 1 chow 0.987997 True Tibetan_mastiff 0.007099 True Newfoundland 0.002140 True NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... Grizzwald floofer 1.3
245 884162670584377345 https://pbs.twimg.com/media/DEUtQbzW0AUTv_o.jpg 1 German_shepherd 0.707046 True malinois 0.199396 True Norwegian_elkhound 0.049148 True NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... Yogi doggo 1.2
246 886366144734445568 https://pbs.twimg.com/media/DE0BTnQUwAApKEH.jpg 1 French_bulldog 0.999201 True Chihuahua 0.000361 True Boston_bull 0.000076 True NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... Roscoe pupper 1.2
247 889531135344209921 https://pbs.twimg.com/media/DFg_2PVW0AEHN3p.jpg 1 golden_retriever 0.953442 True Labrador_retriever 0.013834 True redbone 0.007958 True NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... Stuart puppo 1.3
248 889665388333682689 https://pbs.twimg.com/media/DFi579UWsAAatzw.jpg 1 Pembroke 0.966327 True Cardigan 0.027356 True basenji 0.004633 True NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... None puppo 1.3
249 890240255349198849 https://pbs.twimg.com/media/DFrEyVuW0AAO3t9.jpg 1 Pembroke 0.511319 True Cardigan 0.451038 True Chihuahua 0.029248 True NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... Cassie doggo 1.4

250 rows × 19 columns

In [57]:
df_merge = pd.merge(df_merge, df_tweet_data_1, on=['tweet_id'])
df_merge
Out[57]:
tweet_id jpg_url img_num p1 p1_conf p1_dog p2 p2_conf p2_dog p3 ... p3_dog in_reply_to_status_id in_reply_to_user_id timestamp text name dog_stages rating_percent retweets favorites
0 672160042234327040 https://pbs.twimg.com/media/CVP9_beUEAAwURR.jpg 1 pug 0.561027 True French_bulldog 0.222114 True Labrador_retriever ... True NaN NaN 2015-12-02 21:06:56 +0000 This is Bubba. He's a Titted Peebles Aorta. Ev... Bubba pupper 0.8 365 881
1 672205392827572224 https://pbs.twimg.com/media/CVQnPMrVAAAzShR.jpg 1 carton 0.952613 False crate 0.035376 False pug ... True NaN NaN 2015-12-03 00:07:09 +0000 This is Opal. He's a Royal John Coctostan. Rea... Opal pupper 0.9 1177 2276
2 672254177670729728 https://pbs.twimg.com/media/CVRTmz1WcAA4uMF.jpg 1 pug 0.979487 True French_bulldog 0.016850 True Norwegian_elkhound ... True NaN NaN 2015-12-03 03:21:00 +0000 This is Rolf. He's having the time of his life... Rolf pupper 1.1 755 1438
3 672481316919734272 https://pbs.twimg.com/media/CVUiMUeW4AEQgkU.jpg 1 Border_collie 0.599454 True collie 0.106227 True Shetland_sheepdog ... True NaN NaN 2015-12-03 18:23:34 +0000 Say hello to Jazz. She should be on the cover ... Jazz pupper 1.2 128 722
4 672594978741354496 https://pbs.twimg.com/media/CVWJkJXWsAInlZl.jpg 1 Great_Pyrenees 0.755945 True Old_English_sheepdog 0.082337 True Afghan_hound ... True NaN NaN 2015-12-04 01:55:13 +0000 Meet Scott. Just trying to catch his train to ... Scott pupper 0.9 620 1340
5 672622327801233409 https://pbs.twimg.com/media/CVWicBbUYAIomjC.jpg 1 golden_retriever 0.952773 True Labrador_retriever 0.010835 True clumber ... True NaN NaN 2015-12-04 03:43:54 +0000 This lil pupper is sad because we haven't foun... None pupper 1.2 505 1311
6 672975131468300288 https://pbs.twimg.com/media/CVbjRSIWsAElw2s.jpg 1 pug 0.836421 True Brabancon_griffon 0.044668 True French_bulldog ... True NaN NaN 2015-12-05 03:05:49 +0000 This is Chuckles. He is one skeptical pupper. ... Chuckles pupper 1.0 933 1697
7 672988786805112832 https://pbs.twimg.com/media/CVbvjKqW4AA_CuD.jpg 1 Lakeland_terrier 0.836632 True West_Highland_white_terrier 0.073900 True wire-haired_fox_terrier ... True NaN NaN 2015-12-05 04:00:04 +0000 This is Schnozz. He's had a blurred tail since... Schnozz pupper 1.0 299 993
8 673295268553605120 https://pbs.twimg.com/media/CVgGc9hWIAIe1bn.jpg 1 golden_retriever 0.889241 True Labrador_retriever 0.064683 True Great_Pyrenees ... True NaN NaN 2015-12-06 00:17:55 +0000 Meet Eve. She's a raging alcoholic 8/10 (would... Eve pupper 0.8 3242 7590
9 673342308415348736 https://pbs.twimg.com/media/CVgxQc5XIAAYL0W.jpg 1 ski_mask 0.981017 False Chihuahua 0.013559 True kelpie ... True NaN NaN 2015-12-06 03:24:51 +0000 This is Django. He's a skilled assassin pupper... Django pupper 1.0 600 1288
10 673612854080196609 https://pbs.twimg.com/media/CVknUTlVEAARjU5.jpg 1 Newfoundland 0.223101 True Leonberg 0.111106 True shovel ... False NaN NaN 2015-12-06 21:19:54 +0000 This is Jeffri. He's a speckled ice pupper. Ve... Jeffri pupper 0.7 741 1607
11 673656262056419329 https://pbs.twimg.com/media/CVlOy3pW4AQ9H1K.jpg 1 bull_mastiff 0.700625 True Rhodesian_ridgeback 0.094698 True Brabancon_griffon ... True NaN NaN 2015-12-07 00:12:23 +0000 This is Albert AKA King Banana Peel. He's a ki... Albert pupper 1.0 248 722
12 673707060090052608 https://pbs.twimg.com/media/CVl8_EPWoAAcuSC.jpg 1 German_short-haired_pointer 0.935771 True kelpie 0.022561 True Labrador_retriever ... True NaN NaN 2015-12-07 03:34:14 +0000 This is Raymond. He's absolutely terrified of ... Raymond pupper 1.0 403 1107
13 673919437611909120 https://pbs.twimg.com/media/CVo-JuMWwAAet6F.jpg 1 jack-o'-lantern 0.172079 False schipperke 0.115984 True miniature_pinscher ... True NaN NaN 2015-12-07 17:38:09 +0000 This is Obie. He is on guard watching for evil... Obie pupper 1.1 378 1183
14 673956914389192708 https://pbs.twimg.com/media/CVpgPGwWoAEV7gG.jpg 1 pug 0.586161 True Brabancon_griffon 0.082744 True Chihuahua ... True NaN NaN 2015-12-07 20:07:04 +0000 This is one esteemed pupper. Just graduated co... one pupper 1.0 991 1969
15 674038233588723717 https://pbs.twimg.com/media/CVqqMtiVEAEye_L.jpg 1 Eskimo_dog 0.358459 True Norwegian_elkhound 0.206963 True malamute ... True NaN NaN 2015-12-08 01:30:12 +0000 This is Kaiya. She's an aspiring shoe model. 1... Kaiya pupper 1.2 424 1116
16 674262580978937856 https://pbs.twimg.com/media/CVt2PawWIAEUkqW.jpg 1 Greater_Swiss_Mountain_dog 0.519428 True boxer 0.121500 True Staffordshire_bullterrier ... True NaN NaN 2015-12-08 16:21:41 +0000 This is Gus. He's super stoked about being an ... Gus pupper 0.9 468 1324
17 674447403907457024 https://pbs.twimg.com/media/CVweVUfW4AACPwI.jpg 1 Brabancon_griffon 0.409909 True malinois 0.244649 True bull_mastiff ... True NaN NaN 2015-12-09 04:36:06 +0000 This pupper just wants a belly rub. This puppe... None pupper 1.0 367 1084
18 674638615994089473 https://pbs.twimg.com/media/CVzMPh1UsAELQ_p.jpg 1 Pomeranian 0.846986 True chow 0.142014 True keeshond ... True NaN NaN 2015-12-09 17:15:54 +0000 This pupper is fed up with being tickled. 12/1... None pupper 1.2 599 1711
19 674737130913071104 https://pbs.twimg.com/media/CV0l10AU8AAfg-a.jpg 1 Pomeranian 0.948537 True schipperke 0.014310 True Chihuahua ... True NaN NaN 2015-12-09 23:47:22 +0000 Meet Rufio. He is unaware of the pink legless ... Rufio pupper 1.0 96 661
20 674774481756377088 https://pbs.twimg.com/media/CV1HztsWoAAuZwo.jpg 1 Chihuahua 0.407016 True French_bulldog 0.309978 True Siamese_cat ... False NaN NaN 2015-12-10 02:15:47 +0000 This is Superpup. His head isn't proportional ... Superpup pupper 1.1 492 1140
21 675006312288268288 https://pbs.twimg.com/media/CV4aqCwWsAIi3OP.jpg 1 boxer 0.654697 True space_heater 0.043389 False beagle ... True NaN NaN 2015-12-10 17:37:00 +0000 Say hello to Mollie. This pic was taken after ... Mollie pupper 1.0 235 1003
22 675334060156301312 https://pbs.twimg.com/media/CV9EvZNUwAAgLCK.jpg 2 Pembroke 0.773135 True Cardigan 0.116810 True chow ... True NaN NaN 2015-12-11 15:19:21 +0000 Good morning here's a grass pupper. 12/10 http... None pupper 1.2 1344 2832
23 675740360753160193 https://pbs.twimg.com/ext_tw_video_thumb/67574... 1 golden_retriever 0.800495 True kuvasz 0.097756 True Saluki ... True NaN NaN 2015-12-12 18:13:51 +0000 Here's a pupper licking in slow motion. 12/10 ... None pupper 1.2 360 1196
24 675845657354215424 https://pbs.twimg.com/media/CWEWClfW4AAnqhG.jpg 1 pug 0.883952 True Boston_bull 0.011057 True French_bulldog ... True NaN NaN 2015-12-13 01:12:15 +0000 This is Pepper. She's not fully comfortable ri... Pepper pupper 1.0 924 2330
25 675898130735476737 https://pbs.twimg.com/media/CWFFt3_XIAArIYK.jpg 1 Labrador_retriever 0.407430 True malinois 0.077037 True pug ... True NaN NaN 2015-12-13 04:40:46 +0000 I'm sure you've all seen this pupper. Not prep... None pupper 1.0 596 1666
26 676263575653122048 https://pbs.twimg.com/media/CWKSIfUUYAAiOBO.jpg 1 teddy 0.098283 False toy_poodle 0.098029 True shopping_basket ... False NaN NaN 2015-12-14 04:52:55 +0000 All this pupper wanted to do was go skiing. No... None pupper 1.0 576 2131
27 676470639084101634 https://pbs.twimg.com/media/CWNOdIpWoAAWid2.jpg 1 golden_retriever 0.790386 True borzoi 0.022885 True dingo ... False NaN NaN 2015-12-14 18:35:43 +0000 Three generations of pupper. 11/10 for all htt... None pupper 1.1 4876 11901
28 676575501977128964 https://pbs.twimg.com/media/CWOt07EUsAAnOYW.jpg 1 feather_boa 0.424106 False Yorkshire_terrier 0.073144 True Shetland_sheepdog ... True NaN NaN 2015-12-15 01:32:24 +0000 This pupper is very passionate about Christmas... None pupper 0.8 1169 2661
29 676603393314578432 https://pbs.twimg.com/media/CWPHMqKVAAAE78E.jpg 1 whippet 0.877021 True Great_Dane 0.034182 True boxer ... True NaN NaN 2015-12-15 03:23:14 +0000 This is Godzilla pupper. He had a ruff childho... Godzilla pupper 0.9 402 1195
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
220 834574053763584002 https://pbs.twimg.com/media/C5UAqgyXAAAbMWH.jpg 1 toilet_tissue 0.262936 False golden_retriever 0.226564 True bathtub ... False NaN NaN 2017-02-23 01:22:14 +0000 Here's a doggo fully pupared for a shower. H*c... None doggo 1.3 2692 14270
221 836753516572119041 https://pbs.twimg.com/media/C5y-4VwWcAIcaoj.jpg 1 mortarboard 0.936882 False academic_gown 0.020815 False schipperke ... True NaN NaN 2017-03-01 01:42:39 +0000 This is Meera. She just heard about taxes and ... Meera doggo 1.2 4901 20049
222 837110210464448512 https://pbs.twimg.com/media/C54DS1kXQAEU5pS.jpg 1 Siberian_husky 0.767696 True Eskimo_dog 0.217079 True malamute ... True NaN NaN 2017-03-02 01:20:01 +0000 This is Clark. He passed pupper training today... Clark pupper 1.3 2540 16685
223 837820167694528512 https://pbs.twimg.com/media/C6CI_jbVAAA3-a1.jpg 1 golden_retriever 0.887625 True Labrador_retriever 0.068718 True kuvasz ... True NaN NaN 2017-03-04 00:21:08 +0000 Here's a pupper before and after being asked "... None pupper 1.2 8336 35587
224 845306882940190720 https://pbs.twimg.com/media/C7siH5DXkAACnDT.jpg 1 Irish_water_spaniel 0.567475 True Labrador_retriever 0.169496 True curly-coated_retriever ... True NaN NaN 2017-03-24 16:10:40 +0000 This is Pickles. She's a silly pupper. Thinks ... Pickles pupper 1.2 5664 24089
225 845397057150107648 https://pbs.twimg.com/media/C7t0IzLWkAINoft.jpg 1 Dandie_Dinmont 0.394404 True Maltese_dog 0.186537 True West_Highland_white_terrier ... True NaN NaN 2017-03-24 22:08:59 +0000 Say hello to Mimosa. She's an emotional suppor... Mimosa doggo 1.3 1895 7886
226 846514051647705089 https://pbs.twimg.com/media/C79sB4xXwAEvwKY.jpg 2 golden_retriever 0.650003 True Leonberg 0.065199 True Norfolk_terrier ... True NaN NaN 2017-03-28 00:07:32 +0000 This is Barney. He's an elder doggo. Hitches a... Barney doggo 1.3 12160 45996
227 850019790995546112 https://pbs.twimg.com/media/C8vgfTsXgAA561h.jpg 3 Shetland_sheepdog 0.759907 True collie 0.107405 True Pembroke ... True NaN NaN 2017-04-06 16:18:05 +0000 Say hello to Boomer. He's a sandy pupper. Havi... Boomer pupper 1.2 5090 20954
228 854120357044912130 https://pbs.twimg.com/media/C9px7jyVwAAnmwN.jpg 4 black-and-tan_coonhound 0.854861 True Doberman 0.050792 True bluetick ... True NaN NaN 2017-04-17 23:52:16 +0000 Sometimes you guys remind me just how impactfu... None pupper 1.4 7697 32428
229 858843525470990336 https://pbs.twimg.com/media/C-s5oYZXkAAMHHq.jpg 1 golden_retriever 0.578120 True Labrador_retriever 0.286059 True bloodhound ... True NaN NaN 2017-05-01 00:40:27 +0000 I have stumbled puppon a doggo painting party.... None doggo 1.3 3523 15587
230 859607811541651456 https://pbs.twimg.com/media/C-3wvtxXcAUTuBE.jpg 1 golden_retriever 0.895529 True Irish_setter 0.024099 True Labrador_retriever ... True NaN NaN 2017-05-03 03:17:27 +0000 Sorry for the lack of posts today. I came home... None puppo 1.3 1587 18612
231 866450705531457537 https://pbs.twimg.com/media/DAZAUfBXcAAG_Nn.jpg 2 French_bulldog 0.905334 True Boston_bull 0.078060 True pug ... True NaN NaN 2017-05-22 00:28:40 +0000 This is Jamesy. He gives a kiss to every other... Jamesy pupper 1.3 35150 121128
232 867421006826221569 https://pbs.twimg.com/media/DAmyy8FXYAIH8Ty.jpg 1 Eskimo_dog 0.616457 True Siberian_husky 0.381330 True malamute ... True NaN NaN 2017-05-24 16:44:18 +0000 This is Shikha. She just watched you drop a sk... Shikha puppo 1.2 2485 15934
233 869596645499047938 https://pbs.twimg.com/media/DBFtiYqWAAAsjj1.jpg 1 Chihuahua 0.955156 True toy_terrier 0.008054 True muzzle ... False NaN NaN 2017-05-30 16:49:31 +0000 This is Scout. He just graduated. Officially a... Scout doggo 1.2 3106 15765
234 871515927908634625 https://pbs.twimg.com/media/DBg_HT9WAAEeIMM.jpg 2 komondor 0.974781 True briard 0.020041 True swab ... False NaN NaN 2017-06-04 23:56:03 +0000 This is Napolean. He's a Raggedy East Nicaragu... Napolean doggo 1.2 3402 19847
235 871762521631449091 https://pbs.twimg.com/media/DBkfY58XcAEdzZy.jpg 2 Labrador_retriever 0.921393 True golden_retriever 0.064608 True bloodhound ... True NaN NaN 2017-06-05 16:15:56 +0000 This is Rover. As part of pupper protocol he h... Rover pupper 1.2 3419 19894
236 872967104147763200 https://pbs.twimg.com/media/DB1m871XUAAw5vZ.jpg 2 Labrador_retriever 0.476913 True Chesapeake_Bay_retriever 0.174145 True German_short-haired_pointer ... True NaN NaN 2017-06-09 00:02:31 +0000 Here's a very large dog. He has a date later. ... None doggo 1.2 5308 26775
237 873213775632977920 https://pbs.twimg.com/media/DB5HTBGXUAE0TiK.jpg 1 vizsla 0.619782 True bloodhound 0.338069 True Chesapeake_Bay_retriever ... True NaN NaN 2017-06-09 16:22:42 +0000 This is Sierra. She's one precious pupper. Abs... Sierra pupper 1.2 1551 7085
238 874012996292530176 https://pbs.twimg.com/media/DCEeLxjXsAAvNSM.jpg 2 Cardigan 0.806674 True Pembroke 0.116622 True kelpie ... True NaN NaN 2017-06-11 21:18:31 +0000 This is Sebastian. He can't see all the colors... Sebastian puppo 1.3 10177 33797
239 874296783580663808 https://pbs.twimg.com/media/DCIgSR0XgAANEOY.jpg 1 cocker_spaniel 0.437216 True miniature_poodle 0.277191 True toy_poodle ... True NaN NaN 2017-06-12 16:06:11 +0000 This is Jed. He may be the fanciest pupper in ... Jed pupper 1.3 4016 25507
240 876838120628539392 https://pbs.twimg.com/media/DCsnnZsVwAEfkyi.jpg 1 bloodhound 0.575751 True redbone 0.240970 True Tibetan_mastiff ... True NaN NaN 2017-06-19 16:24:33 +0000 This is Ginger. She's having a ruff Monday. To... Ginger pupper 1.2 3254 20223
241 878776093423087618 https://pbs.twimg.com/media/DDIKMXzW0AEibje.jpg 2 Italian_greyhound 0.734684 True whippet 0.150487 True Ibizan_hound ... True NaN NaN 2017-06-25 00:45:22 +0000 This is Snoopy. He's a proud #PrideMonthPuppo.... Snoopy puppo 1.3 4015 18964
242 881536004380872706 https://pbs.twimg.com/ext_tw_video_thumb/88153... 1 Samoyed 0.281463 True Angora 0.272066 False Persian_cat ... False NaN NaN 2017-07-02 15:32:16 +0000 Here is a pupper approaching maximum borkdrive... a pupper 1.4 15508 48241
243 882762694511734784 https://pbs.twimg.com/media/DEAz_HHXsAA-p_z.jpg 1 Labrador_retriever 0.850050 True Chesapeake_Bay_retriever 0.074257 True flat-coated_retriever ... True NaN NaN 2017-07-06 00:46:41 +0000 This is Gus. He's quite the cheeky pupper. Alr... Gus pupper 1.2 4761 27623
244 883360690899218434 https://pbs.twimg.com/media/DEJT3FeXoAAtwUy.jpg 1 chow 0.987997 True Tibetan_mastiff 0.007099 True Newfoundland ... True NaN NaN 2017-07-07 16:22:55 +0000 Meet Grizzwald. He may be the floofiest floofe... Grizzwald floofer 1.3 3597 22148
245 884162670584377345 https://pbs.twimg.com/media/DEUtQbzW0AUTv_o.jpg 1 German_shepherd 0.707046 True malinois 0.199396 True Norwegian_elkhound ... True NaN NaN 2017-07-09 21:29:42 +0000 Meet Yogi. He doesn't have any important dog m... Yogi doggo 1.2 2892 19866
246 886366144734445568 https://pbs.twimg.com/media/DE0BTnQUwAApKEH.jpg 1 French_bulldog 0.999201 True Chihuahua 0.000361 True Boston_bull ... True NaN NaN 2017-07-15 23:25:31 +0000 This is Roscoe. Another pupper fallen victim t... Roscoe pupper 1.2 3105 20672
247 889531135344209921 https://pbs.twimg.com/media/DFg_2PVW0AEHN3p.jpg 1 golden_retriever 0.953442 True Labrador_retriever 0.013834 True redbone ... True NaN NaN 2017-07-24 17:02:04 +0000 This is Stuart. He's sporting his favorite fan... Stuart puppo 1.3 2184 14757
248 889665388333682689 https://pbs.twimg.com/media/DFi579UWsAAatzw.jpg 1 Pembroke 0.966327 True Cardigan 0.027356 True basenji ... True NaN NaN 2017-07-25 01:55:32 +0000 Here's a puppo that seems to be on the fence a... None puppo 1.3 9732 46919
249 890240255349198849 https://pbs.twimg.com/media/DFrEyVuW0AAO3t9.jpg 1 Pembroke 0.511319 True Cardigan 0.451038 True Chihuahua ... True NaN NaN 2017-07-26 15:59:51 +0000 This is Cassie. She is a college pup. Studying... Cassie doggo 1.4 7153 31147

250 rows × 21 columns

Store the clean DataFrame in a CSV file

In [58]:
df_merge.to_csv('twitter_archive_master.csv', index=False)

Insights

1. p1 predicts that it is a dog 87% of the time.

In [59]:
df_merge.p1_dog.mean()
Out[59]:
0.872

2. Number of Favorites for each Dog Stage.

In [60]:
df_merge.groupby(['dog_stages'])['favorites'].mean()
Out[60]:
dog_stages
doggo      20241.944444
floofer    12580.857143
pupper      7276.476190
puppo      21576.904762
Name: favorites, dtype: float64

3. Number of Retweets for each Dog Stage

In [61]:
df_merge.groupby(['dog_stages'])['retweets'].mean()
Out[61]:
dog_stages
doggo      7000.555556
floofer    4641.142857
pupper     2280.886905
puppo      6143.047619
Name: retweets, dtype: float64

Visualize the Data

1. Average Rating Percent for each Dog Stage

In [62]:
# calculate mean ratings by dog stage
stage_rating_avg = df_merge.groupby(['dog_stages'])['rating_percent'].mean()
In [63]:
# convert series to a data frame
stage_rating_avg.to_frame()
Out[63]:
rating_percent
dog_stages
doggo 1.192593
floofer 1.200000
pupper 1.086470
puppo 1.195238
In [64]:
stage_rating_avg1 = stage_rating_avg.reset_index(level=['dog_stages'])
stage_rating_avg1.sort_values(by='rating_percent', ascending=False)
Out[64]:
dog_stages rating_percent
1 floofer 1.200000
3 puppo 1.195238
0 doggo 1.192593
2 pupper 1.086470
In [65]:
g = sns.barplot(data=stage_rating_avg1, x="dog_stages", y="rating_percent")
g.set_xticklabels(g.get_xticklabels(), rotation=90)
ax = plt.gca()
ax.set_title("Average Rating Percent by Dog Stage")
plt.xlabel("Dog Stages")
plt.ylabel("Average Rating Percent")
Out[65]:
Text(0,0.5,'Average Rating Percent')

According to the barplot above, the average rating percent ranking for each dog stage is as follows:

  1. floofer
  2. puppo
  3. doggo
  4. pupper