{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "Jupyter Notebook es un modo muy fácil de empezar con [data science](https://en.wikipedia.org/wiki/Data_science) y programar en Python, te permite correr código en diferentes órdenes y combinarlo con texto, gráficas e incluso algunos elementos web que pueden ser muy prácticos para presentar datos. De ahí que sea *notebook.*\n", "\n", "### Instalando Jupyter Notebook\n", "\n", "No me voy a concentrar en cómo instalar Jupyter. Puedes instalarlo pendiante pip si ya tienes instalado Python o puedes utilizar Anaconda. Si necesitas instalar Python y estas en macOS puedes instalarlo utilizando [brew](). Recuerda instalar Python 3\n", "\n", "Pandas y Jupyter estan incluidos con [Anaconda](https://www.anaconda.com/). Anaconda es un paquete de varias herramietas de data science por lo cual para la mayoría de los usuarios va a ser la forma más fácil de instalar todo.\n", "\n", "- [Instalación de Python](https://www.python.org/downloads/release/python-373/)\n", "- [Instalando Brew (Opcional si utilizas macOS)]()\n", "- [Instalación de Jupyter (Si utilizas Anaconda no necesitas instalar Python aparte)](https://jupyter.org/install)\n", "\n", "### ¿Qué podemos hacer con Jupyter y Pandas?\n", "\n", "#### Hacer este artículo!\n", "\n", "Si! Además de aquí en el blog, este artículo lo cree utilizando Jupyter Notebook. Puedes ver una versión de ella en [NBviwer](https://nbviewer.jupyter.org/github/Darkade/notebooks/blob/master/Cosas%20que%20hacer%20con%20jupyter.ipynb) o [GitHub](https://github.com/Darkade/notebooks/blob/master/Cosas%20que%20hacer%20con%20jupyter.ipynb) (más sobre esas dos cosas adelante).\n", "\n", "~~El resto del artículo esta escrito como si estuvieras leyendo esto en una libreta de Jupyter~~" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### Ser el backbone de Five Thirty Eight\n", "\n", "[Five Thirty Eight](https://fivethirtyeight.com/) es **el sitio** de periodismo de datos, para algunos de los ejemplos este artículo tomé datos de su [Github](https://github.com/fivethirtyeight/data) que utilizaron [aquí](https://fivethirtyeight.com/features/americas-favorite-star-wars-movies-and-least-favorite-characters/).\n", "\n", "#### Importar Datos\n", "\n", "Para empezar pandas puede adquirir datos de básicamente cualquier lado. Se pueden introducir datos a mano, importar CSVs, leer datos estilo excel que hayas copiado, JSONs, HTMLs, hacer queries de SQL, o conectarse a Google BigQuery y más.\n", "\n", "\n", "Vamos a empezar importando un CSV sencillo e imprimiendolo cómo tabla." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from IPython.display import display, GeoJSON" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", " | RespondentID | \n", "Have you seen any of the 6 films in the Star Wars franchise? | \n", "Do you consider yourself to be a fan of the Star Wars film franchise? | \n", "Which of the following Star Wars films have you seen? Please select all that apply. | \n", "Unnamed: 4 | \n", "Unnamed: 5 | \n", "Unnamed: 6 | \n", "Unnamed: 7 | \n", "Unnamed: 8 | \n", "Please rank the Star Wars films in order of preference with 1 being your favorite film in the franchise and 6 being your least favorite film. | \n", "... | \n", "Unnamed: 28 | \n", "Which character shot first? | \n", "Are you familiar with the Expanded Universe? | \n", "Do you consider yourself to be a fan of the Expanded Universe?�� | \n", "Do you consider yourself to be a fan of the Star Trek franchise? | \n", "Gender | \n", "Age | \n", "Household Income | \n", "Education | \n", "Location (Census Region) | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "NaN | \n", "Response | \n", "Response | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "Star Wars: Episode I The Phantom Menace | \n", "... | \n", "Yoda | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "Response | \n", "
1 | \n", "3.292880e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "Yes | \n", "No | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "High school degree | \n", "South Atlantic | \n", "
2 | \n", "3.292880e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "Bachelor degree | \n", "West South Central | \n", "
3 | \n", "3.292765e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "NaN | \n", "NaN | \n", "1 | \n", "... | \n", "Unfamiliar (N/A) | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "High school degree | \n", "West North Central | \n", "
4 | \n", "3.292763e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$100,000 - $149,999 | \n", "Some college or Associate degree | \n", "West North Central | \n", "
5 | \n", "3.292731e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Somewhat favorably | \n", "Greedo | \n", "Yes | \n", "No | \n", "No | \n", "Male | \n", "18-29 | \n", "$100,000 - $149,999 | \n", "Some college or Associate degree | \n", "West North Central | \n", "
6 | \n", "3.292719e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "1 | \n", "... | \n", "Very favorably | \n", "Han | \n", "Yes | \n", "No | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$25,000 - $49,999 | \n", "Bachelor degree | \n", "Middle Atlantic | \n", "
7 | \n", "3.292685e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Han | \n", "Yes | \n", "No | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "High school degree | \n", "East North Central | \n", "
8 | \n", "3.292664e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Male | \n", "18-29 | \n", "NaN | \n", "High school degree | \n", "South Atlantic | \n", "
9 | \n", "3.292654e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Somewhat favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "South Atlantic | \n", "
10 | \n", "3.292640e+09 | \n", "Yes | \n", "No | \n", "NaN | \n", "Star Wars: Episode II Attack of the Clones | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "1 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "$25,000 - $49,999 | \n", "Some college or Associate degree | \n", "Pacific | \n", "
11 | \n", "3.292638e+09 | \n", "Yes | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
12 | \n", "3.292635e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
13 | \n", "3.292609e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "$25,000 - $49,999 | \n", "Bachelor degree | \n", "South Atlantic | \n", "
14 | \n", "3.292597e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Graduate degree | \n", "Mountain | \n", "
15 | \n", "3.292587e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "High school degree | \n", "East North Central | \n", "
16 | \n", "3.292583e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Somewhat favorably | \n", "Han | \n", "Yes | \n", "Yes | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "West South Central | \n", "
17 | \n", "3.292581e+09 | \n", "Yes | \n", "Yes | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode IV A New Hope | \n", "NaN | \n", "NaN | \n", "4 | \n", "... | \n", "Very unfavorably | \n", "Han | \n", "Yes | \n", "Yes | \n", "No | \n", "Male | \n", "18-29 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "New England | \n", "
18 | \n", "3.292573e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode VI Return of the Jedi | \n", "1 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "Some college or Associate degree | \n", "Middle Atlantic | \n", "
19 | \n", "3.292565e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "High school degree | \n", "South Atlantic | \n", "
20 | \n", "3.292562e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "No | \n", "NaN | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$50,000 - $99,999 | \n", "Some college or Associate degree | \n", "West North Central | \n", "
21 | \n", "3.292522e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "Some college or Associate degree | \n", "Pacific | \n", "
22 | \n", "3.292521e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "NaN | \n", "3 | \n", "... | \n", "Neither favorably nor unfavorably (neutral) | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "Bachelor degree | \n", "Pacific | \n", "
23 | \n", "3.292512e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "Yes | \n", "Yes | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "South Atlantic | \n", "
24 | \n", "3.292483e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "Bachelor degree | \n", "Pacific | \n", "
25 | \n", "3.292465e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "1 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "NaN | \n", "East North Central | \n", "
26 | \n", "3.292448e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Yes | \n", "Male | \n", "18-29 | \n", "$0 - $24,999 | \n", "High school degree | \n", "East South Central | \n", "
27 | \n", "3.292420e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "Yes | \n", "No | \n", "No | \n", "Male | \n", "18-29 | \n", "$100,000 - $149,999 | \n", "Some college or Associate degree | \n", "South Atlantic | \n", "
28 | \n", "3.292384e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "Some college or Associate degree | \n", "Middle Atlantic | \n", "
29 | \n", "3.292380e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "Han | \n", "Yes | \n", "No | \n", "No | \n", "Male | \n", "18-29 | \n", "NaN | \n", "Some college or Associate degree | \n", "Middle Atlantic | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
1157 | \n", "3.288426e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Graduate degree | \n", "Middle Atlantic | \n", "
1158 | \n", "3.288423e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Male | \n", "45-60 | \n", "$100,000 - $149,999 | \n", "Graduate degree | \n", "Middle Atlantic | \n", "
1159 | \n", "3.288423e+09 | \n", "Yes | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "2 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "45-60 | \n", "$0 - $24,999 | \n", "Bachelor degree | \n", "Pacific | \n", "
1160 | \n", "3.288422e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Female | \n", "> 60 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "West South Central | \n", "
1161 | \n", "3.288421e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "NaN | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "18-29 | \n", "$25,000 - $49,999 | \n", "Some college or Associate degree | \n", "Pacific | \n", "
1162 | \n", "3.288418e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Neither favorably nor unfavorably (neutral) | \n", "Greedo | \n", "No | \n", "NaN | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1163 | \n", "3.288418e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "18-29 | \n", "$25,000 - $49,999 | \n", "Graduate degree | \n", "South Atlantic | \n", "
1164 | \n", "3.288417e+09 | \n", "Yes | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Very favorably | \n", "Han | \n", "Yes | \n", "No | \n", "No | \n", "Female | \n", "> 60 | \n", "NaN | \n", "Bachelor degree | \n", "New England | \n", "
1165 | \n", "3.288415e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Neither favorably nor unfavorably (neutral) | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Male | \n", "45-60 | \n", "$100,000 - $149,999 | \n", "Graduate degree | \n", "Middle Atlantic | \n", "
1166 | \n", "3.288414e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "Mountain | \n", "
1167 | \n", "3.288413e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "18-29 | \n", "$150,000+ | \n", "Some college or Associate degree | \n", "South Atlantic | \n", "
1168 | \n", "3.288410e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "Greedo | \n", "Yes | \n", "No | \n", "No | \n", "Female | \n", "30-44 | \n", "NaN | \n", "Graduate degree | \n", "East North Central | \n", "
1169 | \n", "3.288410e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Female | \n", "30-44 | \n", "$150,000+ | \n", "Graduate degree | \n", "East North Central | \n", "
1170 | \n", "3.288409e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Male | \n", "45-60 | \n", "$25,000 - $49,999 | \n", "Bachelor degree | \n", "South Atlantic | \n", "
1171 | \n", "3.288403e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Female | \n", "45-60 | \n", "NaN | \n", "Graduate degree | \n", "East North Central | \n", "
1172 | \n", "3.288403e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Somewhat unfavorably | \n", "Han | \n", "Yes | \n", "Yes | \n", "Yes | \n", "Female | \n", "> 60 | \n", "$25,000 - $49,999 | \n", "Bachelor degree | \n", "Mountain | \n", "
1173 | \n", "3.288403e+09 | \n", "Yes | \n", "Yes | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "2 | \n", "... | \n", "Somewhat favorably | \n", "Greedo | \n", "Yes | \n", "No | \n", "Yes | \n", "Female | \n", "> 60 | \n", "NaN | \n", "High school degree | \n", "Pacific | \n", "
1174 | \n", "3.288403e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "30-44 | \n", "NaN | \n", "Bachelor degree | \n", "Middle Atlantic | \n", "
1175 | \n", "3.288402e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "NaN | \n", "NaN | \n", "1 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "> 60 | \n", "NaN | \n", "Some college or Associate degree | \n", "West North Central | \n", "
1176 | \n", "3.288401e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "1 | \n", "... | \n", "Somewhat favorably | \n", "Han | \n", "Yes | \n", "No | \n", "Yes | \n", "Female | \n", "45-60 | \n", "$50,000 - $99,999 | \n", "Graduate degree | \n", "West South Central | \n", "
1177 | \n", "3.288398e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "2 | \n", "... | \n", "Neither favorably nor unfavorably (neutral) | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "45-60 | \n", "$0 - $24,999 | \n", "High school degree | \n", "Middle Atlantic | \n", "
1178 | \n", "3.288396e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "1 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "Yes | \n", "Male | \n", "> 60 | \n", "$50,000 - $99,999 | \n", "Some college or Associate degree | \n", "Pacific | \n", "
1179 | \n", "3.288395e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Female | \n", "18-29 | \n", "NaN | \n", "Less than high school degree | \n", "West North Central | \n", "
1180 | \n", "3.288392e+09 | \n", "Yes | \n", "Yes | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "45-60 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "West North Central | \n", "
1181 | \n", "3.288390e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "3 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "45-60 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "Pacific | \n", "
1182 | \n", "3.288389e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "5 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "18-29 | \n", "$0 - $24,999 | \n", "Some college or Associate degree | \n", "East North Central | \n", "
1183 | \n", "3.288379e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "Mountain | \n", "
1184 | \n", "3.288375e+09 | \n", "No | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "No | \n", "Female | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "Middle Atlantic | \n", "
1185 | \n", "3.288373e+09 | \n", "Yes | \n", "Yes | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "Star Wars: Episode III Revenge of the Sith | \n", "Star Wars: Episode IV A New Hope | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "4 | \n", "... | \n", "Very favorably | \n", "Han | \n", "No | \n", "NaN | \n", "Yes | \n", "Female | \n", "45-60 | \n", "$100,000 - $149,999 | \n", "Some college or Associate degree | \n", "East North Central | \n", "
1186 | \n", "3.288373e+09 | \n", "Yes | \n", "No | \n", "Star Wars: Episode I The Phantom Menace | \n", "Star Wars: Episode II Attack of the Clones | \n", "NaN | \n", "NaN | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "Star Wars: Episode VI Return of the Jedi | \n", "6 | \n", "... | \n", "Very unfavorably | \n", "I don't understand this question | \n", "No | \n", "NaN | \n", "No | \n", "Female | \n", "> 60 | \n", "$50,000 - $99,999 | \n", "Graduate degree | \n", "Pacific | \n", "
1187 rows × 38 columns
\n", "\n", " | count | \n", "unique | \n", "top | \n", "freq | \n", "
---|---|---|---|---|
Which of the following Star Wars films have you seen? Please select all that apply. | \n", "674 | \n", "1 | \n", "Star Wars: Episode I The Phantom Menace | \n", "674 | \n", "
Unnamed: 4 | \n", "572 | \n", "1 | \n", "Star Wars: Episode II Attack of the Clones | \n", "572 | \n", "
Unnamed: 5 | \n", "551 | \n", "1 | \n", "Star Wars: Episode III Revenge of the Sith | \n", "551 | \n", "
Unnamed: 6 | \n", "608 | \n", "1 | \n", "Star Wars: Episode IV A New Hope | \n", "608 | \n", "
Unnamed: 7 | \n", "759 | \n", "1 | \n", "Star Wars: Episode V The Empire Strikes Back | \n", "759 | \n", "
Unnamed: 8 | \n", "739 | \n", "1 | \n", "Star Wars: Episode VI Return of the Jedi | \n", "739 | \n", "
\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"
\\n\"+\n",
" \"\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"
\\n\"+\n \"