├── config.yml ├── LICENSE ├── .gitignore ├── environment.yml ├── README.md └── get_tweets.ipynb /config.yml: -------------------------------------------------------------------------------- 1 | consumer_key: XXXXXXXXXXXXXXXXXXXXXXXXX 2 | consumer_secret: XXXXXXXXXXXXXXXXXXXXXXXXX 3 | access_token: XXXXXXXXXXXXXXXXXXXXXXXXX 4 | access_token_secret: XXXXXXXXXXXXXXXXXXXXXXXXX 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 DataCamp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | 49 | # Translations 50 | *.mo 51 | *.pot 52 | 53 | # Django stuff: 54 | *.log 55 | local_settings.py 56 | 57 | # Flask stuff: 58 | instance/ 59 | .webassets-cache 60 | 61 | # Scrapy stuff: 62 | .scrapy 63 | 64 | # Sphinx documentation 65 | docs/_build/ 66 | 67 | # PyBuilder 68 | target/ 69 | 70 | # Jupyter Notebook 71 | .ipynb_checkpoints 72 | 73 | # pyenv 74 | .python-version 75 | 76 | # celery beat schedule file 77 | celerybeat-schedule 78 | 79 | # SageMath parsed files 80 | *.sage.py 81 | 82 | # dotenv 83 | .env 84 | 85 | # virtualenv 86 | .venv 87 | venv/ 88 | ENV/ 89 | 90 | # Spyder project settings 91 | .spyderproject 92 | .spyproject 93 | 94 | # Rope project settings 95 | .ropeproject 96 | 97 | # mkdocs documentation 98 | /site 99 | 100 | # mypy 101 | .mypy_cache/ 102 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: ds-twitter 2 | channels: 3 | - defaults 4 | dependencies: 5 | - _nb_ext_conf=0.4.0=py36_1 6 | - anaconda-client=1.6.3=py36_0 7 | - appnope=0.1.0=py36_0 8 | - bleach=1.5.0=py36_0 9 | - certifi=2016.2.28=py36_0 10 | - clyent=1.2.2=py36_0 11 | - cycler=0.10.0=py36_0 12 | - decorator=4.1.2=py36_0 13 | - entrypoints=0.2.3=py36_0 14 | - freetype=2.5.5=2 15 | - html5lib=0.999=py36_0 16 | - icu=54.1=0 17 | - ipykernel=4.6.1=py36_0 18 | - ipython=6.1.0=py36_0 19 | - ipython_genutils=0.2.0=py36_0 20 | - ipywidgets=6.0.0=py36_0 21 | - jedi=0.10.2=py36_2 22 | - jinja2=2.9.6=py36_0 23 | - jsonschema=2.6.0=py36_0 24 | - jupyter=1.0.0=py36_3 25 | - jupyter_client=5.1.0=py36_0 26 | - jupyter_console=5.2.0=py36_0 27 | - jupyter_core=4.3.0=py36_0 28 | - libpng=1.6.30=1 29 | - markupsafe=1.0=py36_0 30 | - matplotlib=2.0.2=np113py36_0 31 | - mistune=0.7.4=py36_0 32 | - mkl=2017.0.3=0 33 | - nb_anacondacloud=1.4.0=py36_0 34 | - nb_conda=2.2.0=py36_0 35 | - nb_conda_kernels=2.1.0=py36_0 36 | - nbconvert=5.2.1=py36_0 37 | - nbformat=4.4.0=py36_0 38 | - nbpresent=3.0.2=py36_0 39 | - networkx=1.11=py36_0 40 | - notebook=5.0.0=py36_0 41 | - numpy=1.13.1=py36_0 42 | - openssl=1.0.2l=0 43 | - pandas=0.20.3=py36_0 44 | - pandocfilters=1.4.2=py36_0 45 | - path.py=10.3.1=py36_0 46 | - patsy=0.4.1=py36_0 47 | - pexpect=4.2.1=py36_0 48 | - pickleshare=0.7.4=py36_0 49 | - pip=9.0.1=py36_1 50 | - prompt_toolkit=1.0.15=py36_0 51 | - ptyprocess=0.5.2=py36_0 52 | - pygments=2.2.0=py36_0 53 | - pyparsing=2.2.0=py36_0 54 | - pyqt=5.6.0=py36_2 55 | - python=3.6.2=0 56 | - python-dateutil=2.6.1=py36_0 57 | - pytz=2017.2=py36_0 58 | - pyyaml=3.12=py36_0 59 | - pyzmq=16.0.2=py36_0 60 | - qt=5.6.2=2 61 | - qtconsole=4.3.1=py36_0 62 | - readline=6.2=2 63 | - requests=2.14.2=py36_0 64 | - scipy=0.19.1=np113py36_0 65 | - seaborn=0.8=py36_0 66 | - setuptools=36.4.0=py36_1 67 | - simplegeneric=0.8.1=py36_1 68 | - sip=4.18=py36_0 69 | - six=1.10.0=py36_0 70 | - sqlite=3.13.0=0 71 | - statsmodels=0.8.0=np113py36_0 72 | - terminado=0.6=py36_0 73 | - testpath=0.3.1=py36_0 74 | - tk=8.5.18=0 75 | - tornado=4.5.2=py36_0 76 | - traitlets=4.3.2=py36_0 77 | - wcwidth=0.1.7=py36_0 78 | - wheel=0.29.0=py36_0 79 | - widgetsnbextension=3.0.2=py36_0 80 | - xz=5.2.3=0 81 | - yaml=0.1.6=0 82 | - zlib=1.2.11=0 83 | - pip: 84 | - chardet==3.0.4 85 | - idna==2.6 86 | - ipython-genutils==0.2.0 87 | - jupyter-client==5.1.0 88 | - jupyter-console==5.2.0 89 | - jupyter-core==4.3.0 90 | - nb-anacondacloud==1.4.0 91 | - nb-conda==2.2.0 92 | - nb-conda-kernels==2.1.0 93 | - oauthlib==2.0.4 94 | - olefile==0.44 95 | - pillow==4.3.0 96 | - prompt-toolkit==1.0.15 97 | - requests-oauthlib==0.8.0 98 | - tweepy==3.5.0 99 | - urllib3==1.22 100 | - wordcloud==1.3.1 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How the #MeToo Movement Spread on Twitter 2 | What can data science tell us about tweets with the #MeToo hashtag? This repository contains the code for the analysis [here](https://www.datacamp.com/community/blog/metoo-twitter-analysis). 3 | 4 | Below I include how to get set up with the correct Python packages. After this, I provide instructions on how to use these notebooks to reproduce my analysis using the Twitter API. I encourage questions, feedback and pull requests. 5 | 6 | ## Getting set up computationally 7 | 8 | ### 1. Clone the repository 9 | 10 | To get set up for this live coding session, clone this repository. You can do so by executing the following in your terminal: 11 | 12 | ``` 13 | git clone https://github.com/datacamp/datacamp-metoo-analysis 14 | ``` 15 | 16 | Alternatively, you can download the zip file of the repository at the top of the main page of the repository. If you prefer not to use git or don't have experience with it, this a good option. 17 | 18 | ### 2. Download Anaconda (if you haven't already) 19 | 20 | If you do not already have the [Anaconda distribution](https://www.anaconda.com/download/) of Python 3, go get it (n.b., you can also do this w/out Anaconda using `pip` to install the required packages, however Anaconda is great for Data Science and I encourage you to use it). 21 | 22 | ### 3. Create your conda environment for this session 23 | 24 | Navigate to the relevant directory `datacamp-metoo-analysis` and install required packages in a new conda environment: 25 | 26 | ``` 27 | conda env create -f environment.yml 28 | ``` 29 | 30 | This will create a new environment called ds-twitter. To activate the environment on OSX/Linux, execute 31 | 32 | ``` 33 | source activate ds-twitter 34 | ``` 35 | On Windows, execute 36 | 37 | ``` 38 | activate ds-twitter 39 | ``` 40 | 41 | ## Getting the tweets for the analysis 42 | 43 | To protect Twitter users who may have deleted their tweets, Twitter does not allow my to share the actual tweets that I used for the analysis. I can, however, share the tweet IDs. I have done so in the `/data` subdirectory and in the `get_tweets.ipynb` notebook I have provided the code that will allow you to pull all the tweets that still exist in from the Twitter API. 44 | 45 | To do so, you will need to 46 | 47 | * get set up w/ the Twitter API (see below). 48 | * Store your Twitter API credentials in a `config.yml` file (template in this repository). 49 | 50 | After you have the tweets, you can generate the word clouds using `word_clouds.ipynb`. You can also reproduce my analysis using `MeToo_analysis_w_code.ipynb`. 51 | 52 | ### Accessing the Twitter API 53 | 54 | I have taken this verbatim from [Adil Moujahid's post here](http://adilmoujahid.com/posts/2014/07/twitter-analytics/) as he said it so well. 55 | 56 | In order to access Twitter Streaming API, we need to get 4 pieces of information from Twitter: API key, API secret, Access token and Access token secret. Follow the steps below to get all 4 elements: 57 | 58 | * Create a twitter account if you do not already have one. 59 | * Go to https://apps.twitter.com/ and log in with your twitter credentials. 60 | * Click "Create New App" 61 | * Fill out the form, agree to the terms, and click "Create your Twitter application" 62 | * In the next page, click on "API keys" tab, and copy your "API key" and "API secret". 63 | * Scroll down and click "Create my access token", and copy your "Access token" and "Access token secret". 64 | 65 | ### Code 66 | The code in this repository is released under the [MIT license](LICENSE). Read more at the [Open Source Initiative](https://opensource.org/licenses/MIT). All text remains the Intellectual Property of DataCamp. If you wish to reuse, adapt or remix, get in touch with me at hugo at datacamp com to request permission. 67 | -------------------------------------------------------------------------------- /get_tweets.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Getting tweets" 8 | ] 9 | }, 10 | { 11 | "cell_type": "markdown", 12 | "metadata": {}, 13 | "source": [ 14 | "Once you are set-up to access the twitter API (see the README.md in [this repository](https://github.com/datacamp/datacamp-metoo-analysis)), you can get the tweets necessary for this analysis." 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 4, 20 | "metadata": { 21 | "collapsed": true 22 | }, 23 | "outputs": [], 24 | "source": [ 25 | "# Store APIs creds in a dictionary\n", 26 | "import yaml\n", 27 | "with open('config.yml') as f:\n", 28 | " # use safe_load instead load\n", 29 | " d = yaml.safe_load(f)" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": 5, 35 | "metadata": { 36 | "collapsed": true 37 | }, 38 | "outputs": [], 39 | "source": [ 40 | "# Twitter API authentication\n", 41 | "import tweepy\n", 42 | "auth = tweepy.OAuthHandler(d['consumer_key'], d['consumer_secret'])\n", 43 | "auth.set_access_token(d['access_token'], d['access_token_secret'])\n", 44 | "api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)" 45 | ] 46 | }, 47 | { 48 | "cell_type": "code", 49 | "execution_count": 6, 50 | "metadata": { 51 | "collapsed": true 52 | }, 53 | "outputs": [], 54 | "source": [ 55 | "# Read in tweet IDs\n", 56 | "data = pd.read_csv('ids1.csv')\n", 57 | "\n", 58 | "# Store in list tweets that still exist; print out IDs of those that have been deleted by tweeter\n", 59 | "tweet_list = []\n", 60 | "for i, row in data.iterrows():\n", 61 | " if i < 100:\n", 62 | " try:\n", 63 | " id_of_tweet = row['id']\n", 64 | " print(id_of_tweet)\n", 65 | " tweet_list.append(api.get_status(id_of_tweet))\n", 66 | " except:\n", 67 | " print(str(id_of_tweet) + ' not present any more')" 68 | ] 69 | }, 70 | { 71 | "cell_type": "code", 72 | "execution_count": 20, 73 | "metadata": {}, 74 | "outputs": [ 75 | { 76 | "data": { 77 | "text/html": [ 78 | "
| \n", 96 | " | contributors | \n", 97 | "coordinates | \n", 98 | "created_at | \n", 99 | "entities | \n", 100 | "extended_entities | \n", 101 | "favorite_count | \n", 102 | "favorited | \n", 103 | "geo | \n", 104 | "id | \n", 105 | "id_str | \n", 106 | "... | \n", 107 | "quoted_status | \n", 108 | "quoted_status_id | \n", 109 | "quoted_status_id_str | \n", 110 | "retweet_count | \n", 111 | "retweeted | \n", 112 | "retweeted_status | \n", 113 | "source | \n", 114 | "text | \n", 115 | "truncated | \n", 116 | "user | \n", 117 | "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", 122 | "None | \n", 123 | "None | \n", 124 | "Sat Nov 04 20:39:28 +0000 2017 | \n", 125 | "{'hashtags': [], 'symbols': [], 'user_mentions... | \n", 126 | "NaN | \n", 127 | "0 | \n", 128 | "False | \n", 129 | "None | \n", 130 | "926911797885657088 | \n", 131 | "926911797885657088 | \n", 132 | "... | \n", 133 | "NaN | \n", 134 | "NaN | \n", 135 | "NaN | \n", 136 | "0 | \n", 137 | "False | \n", 138 | "NaN | \n", 139 | "<a href=\"http://twitter.com/download/iphone\" r... | \n", 140 | "@BreezyWinter @jatemple @yashar @netflix I'm r... | \n", 141 | "True | \n", 142 | "{'id': 2586084062, 'id_str': '2586084062', 'na... | \n", 143 | "
| 1 | \n", 146 | "None | \n", 147 | "None | \n", 148 | "Thu Nov 02 08:47:32 +0000 2017 | \n", 149 | "{'hashtags': [{'text': 'MeToo', 'indices': [30... | \n", 150 | "NaN | \n", 151 | "0 | \n", 152 | "False | \n", 153 | "None | \n", 154 | "926007858642214912 | \n", 155 | "926007858642214912 | \n", 156 | "... | \n", 157 | "NaN | \n", 158 | "NaN | \n", 159 | "NaN | \n", 160 | "2 | \n", 161 | "False | \n", 162 | "{'created_at': 'Thu Nov 02 08:46:28 +0000 2017... | \n", 163 | "<a href=\"http://twitter.com/download/android\" ... | \n", 164 | "RT @fosslijensen: Psykolog om #MeToo: – Har pa... | \n", 165 | "False | \n", 166 | "{'id': 41124241, 'id_str': '41124241', 'name':... | \n", 167 | "
| 2 | \n", 170 | "None | \n", 171 | "None | \n", 172 | "Fri Nov 03 07:08:06 +0000 2017 | \n", 173 | "{'hashtags': [{'text': 'AcosoSexual', 'indices... | \n", 174 | "NaN | \n", 175 | "0 | \n", 176 | "False | \n", 177 | "None | \n", 178 | "926345224258977792 | \n", 179 | "926345224258977792 | \n", 180 | "... | \n", 181 | "NaN | \n", 182 | "NaN | \n", 183 | "NaN | \n", 184 | "0 | \n", 185 | "False | \n", 186 | "NaN | \n", 187 | "<a href=\"http://www.facebook.com/twitter\" rel=... | \n", 188 | "#AcosoSexual #Metoo https://t.co/JVthDMkJCl | \n", 189 | "False | \n", 190 | "{'id': 709649007694520320, 'id_str': '70964900... | \n", 191 | "
| 3 | \n", 194 | "None | \n", 195 | "None | \n", 196 | "Mon Oct 30 17:44:11 +0000 2017 | \n", 197 | "{'hashtags': [{'text': 'Rechtsstaat', 'indices... | \n", 198 | "NaN | \n", 199 | "0 | \n", 200 | "False | \n", 201 | "None | \n", 202 | "925055745133023232 | \n", 203 | "925055745133023232 | \n", 204 | "... | \n", 205 | "NaN | \n", 206 | "NaN | \n", 207 | "NaN | \n", 208 | "0 | \n", 209 | "False | \n", 210 | "NaN | \n", 211 | "<a href=\"https://mobile.twitter.com\" rel=\"nofo... | \n", 212 | "Wer so einen #Rechtsstaat hat, braucht keine F... | \n", 213 | "False | \n", 214 | "{'id': 440292565, 'id_str': '440292565', 'name... | \n", 215 | "
| 4 | \n", 218 | "None | \n", 219 | "None | \n", 220 | "Mon Oct 30 09:55:50 +0000 2017 | \n", 221 | "{'hashtags': [{'text': 'Metoo', 'indices': [0,... | \n", 222 | "NaN | \n", 223 | "0 | \n", 224 | "False | \n", 225 | "None | \n", 226 | "924937883110334464 | \n", 227 | "924937883110334464 | \n", 228 | "... | \n", 229 | "{'created_at': 'Sun Oct 29 20:34:08 +0000 2017... | \n", 230 | "9.247361e+17 | \n", 231 | "924736128816525312 | \n", 232 | "0 | \n", 233 | "False | \n", 234 | "NaN | \n", 235 | "<a href=\"http://twitter.com/#!/download/ipad\" ... | \n", 236 | "#Metoo If for several women this movement is a... | \n", 237 | "True | \n", 238 | "{'id': 738986651653902336, 'id_str': '73898665... | \n", 239 | "
5 rows × 30 columns
\n", 243 | "| \n", 387 | " | contributors | \n", 388 | "coordinates | \n", 389 | "created_at | \n", 390 | "entities | \n", 391 | "extended_entities | \n", 392 | "favorite_count | \n", 393 | "favorited | \n", 394 | "geo | \n", 395 | "id | \n", 396 | "id_str | \n", 397 | "... | \n", 398 | "quoted_status | \n", 399 | "quoted_status_id | \n", 400 | "quoted_status_id_str | \n", 401 | "retweet_count | \n", 402 | "retweeted | \n", 403 | "retweeted_status | \n", 404 | "source | \n", 405 | "text | \n", 406 | "truncated | \n", 407 | "user | \n", 408 | "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", 413 | "None | \n", 414 | "None | \n", 415 | "Sat Nov 11 04:41:47 +0000 2017 | \n", 416 | "{'hashtags': [], 'symbols': [], 'user_mentions... | \n", 417 | "NaN | \n", 418 | "2 | \n", 419 | "False | \n", 420 | "None | \n", 421 | "929207504843739136 | \n", 422 | "929207504843739136 | \n", 423 | "... | \n", 424 | "NaN | \n", 425 | "NaN | \n", 426 | "NaN | \n", 427 | "0 | \n", 428 | "False | \n", 429 | "NaN | \n", 430 | "<a href=\"http://twitter.com/download/iphone\" r... | \n", 431 | "Yeah just what I thought, America still sucks,... | \n", 432 | "True | \n", 433 | "{'id': 24087885, 'id_str': '24087885', 'name':... | \n", 434 | "
| 1 | \n", 437 | "None | \n", 438 | "None | \n", 439 | "Sat Nov 11 04:41:40 +0000 2017 | \n", 440 | "{'hashtags': [], 'symbols': [], 'user_mentions... | \n", 441 | "NaN | \n", 442 | "7 | \n", 443 | "False | \n", 444 | "None | \n", 445 | "929207473273126913 | \n", 446 | "929207473273126913 | \n", 447 | "... | \n", 448 | "NaN | \n", 449 | "NaN | \n", 450 | "NaN | \n", 451 | "1 | \n", 452 | "False | \n", 453 | "NaN | \n", 454 | "<a href=\"http://twitter.com/download/iphone\" r... | \n", 455 | "Why should women MPs repeat/say what younger/n... | \n", 456 | "True | \n", 457 | "{'id': 406579529, 'id_str': '406579529', 'name... | \n", 458 | "
| 2 | \n", 461 | "None | \n", 462 | "None | \n", 463 | "Sat Nov 11 04:41:39 +0000 2017 | \n", 464 | "{'hashtags': [{'text': 'MeToo', 'indices': [6,... | \n", 465 | "NaN | \n", 466 | "0 | \n", 467 | "False | \n", 468 | "None | \n", 469 | "929207469728964608 | \n", 470 | "929207469728964608 | \n", 471 | "... | \n", 472 | "NaN | \n", 473 | "NaN | \n", 474 | "NaN | \n", 475 | "0 | \n", 476 | "False | \n", 477 | "NaN | \n", 478 | "<a href=\"http://twitter.com\" rel=\"nofollow\">Tw... | \n", 479 | "Okay, #MeToo is getting out of control. Asking... | \n", 480 | "True | \n", 481 | "{'id': 16722659, 'id_str': '16722659', 'name':... | \n", 482 | "
| 3 | \n", 485 | "None | \n", 486 | "None | \n", 487 | "Sat Nov 11 04:41:12 +0000 2017 | \n", 488 | "{'hashtags': [{'text': 'MeToo', 'indices': [57... | \n", 489 | "NaN | \n", 490 | "0 | \n", 491 | "False | \n", 492 | "None | \n", 493 | "929207356050640896 | \n", 494 | "929207356050640896 | \n", 495 | "... | \n", 496 | "NaN | \n", 497 | "NaN | \n", 498 | "NaN | \n", 499 | "18 | \n", 500 | "False | \n", 501 | "{'created_at': 'Fri Nov 10 23:23:05 +0000 2017... | \n", 502 | "<a href=\"http://twitter.com/#!/download/ipad\" ... | \n", 503 | "RT @ETCanada: Watch: @SarahMcLachlan opens up... | \n", 504 | "False | \n", 505 | "{'id': 36332025, 'id_str': '36332025', 'name':... | \n", 506 | "
| 4 | \n", 509 | "None | \n", 510 | "None | \n", 511 | "Sat Nov 11 04:41:05 +0000 2017 | \n", 512 | "{'hashtags': [{'text': 'MeToo', 'indices': [67... | \n", 513 | "NaN | \n", 514 | "64 | \n", 515 | "False | \n", 516 | "None | \n", 517 | "929207327940599808 | \n", 518 | "929207327940599808 | \n", 519 | "... | \n", 520 | "NaN | \n", 521 | "NaN | \n", 522 | "NaN | \n", 523 | "0 | \n", 524 | "False | \n", 525 | "NaN | \n", 526 | "<a href=\"http://twitter.com/download/iphone\" r... | \n", 527 | "@rosemcgowan “Slandering all men?” Another one... | \n", 528 | "False | \n", 529 | "{'id': 19057726, 'id_str': '19057726', 'name':... | \n", 530 | "
5 rows × 30 columns
\n", 534 | "" 535 | ], 536 | "text/plain": [ 537 | " contributors coordinates created_at \\\n", 538 | "0 None None Sat Nov 11 04:41:47 +0000 2017 \n", 539 | "1 None None Sat Nov 11 04:41:40 +0000 2017 \n", 540 | "2 None None Sat Nov 11 04:41:39 +0000 2017 \n", 541 | "3 None None Sat Nov 11 04:41:12 +0000 2017 \n", 542 | "4 None None Sat Nov 11 04:41:05 +0000 2017 \n", 543 | "\n", 544 | " entities extended_entities \\\n", 545 | "0 {'hashtags': [], 'symbols': [], 'user_mentions... NaN \n", 546 | "1 {'hashtags': [], 'symbols': [], 'user_mentions... NaN \n", 547 | "2 {'hashtags': [{'text': 'MeToo', 'indices': [6,... NaN \n", 548 | "3 {'hashtags': [{'text': 'MeToo', 'indices': [57... NaN \n", 549 | "4 {'hashtags': [{'text': 'MeToo', 'indices': [67... NaN \n", 550 | "\n", 551 | " favorite_count favorited geo id id_str \\\n", 552 | "0 2 False None 929207504843739136 929207504843739136 \n", 553 | "1 7 False None 929207473273126913 929207473273126913 \n", 554 | "2 0 False None 929207469728964608 929207469728964608 \n", 555 | "3 0 False None 929207356050640896 929207356050640896 \n", 556 | "4 64 False None 929207327940599808 929207327940599808 \n", 557 | "\n", 558 | " ... quoted_status \\\n", 559 | "0 ... NaN \n", 560 | "1 ... NaN \n", 561 | "2 ... NaN \n", 562 | "3 ... NaN \n", 563 | "4 ... NaN \n", 564 | "\n", 565 | " quoted_status_id quoted_status_id_str retweet_count retweeted \\\n", 566 | "0 NaN NaN 0 False \n", 567 | "1 NaN NaN 1 False \n", 568 | "2 NaN NaN 0 False \n", 569 | "3 NaN NaN 18 False \n", 570 | "4 NaN NaN 0 False \n", 571 | "\n", 572 | " retweeted_status \\\n", 573 | "0 NaN \n", 574 | "1 NaN \n", 575 | "2 NaN \n", 576 | "3 {'created_at': 'Fri Nov 10 23:23:05 +0000 2017... \n", 577 | "4 NaN \n", 578 | "\n", 579 | " source \\\n", 580 | "0 Tw... \n", 583 | "3