{ "metadata": { "name": "", "signature": "sha256:b3ff8e49a8469c871a8eebab23bd7b6cb31116092106438034b148a1b1d4e853" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import os" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "file_name = \"flying-etiquette.csv\"\n", "\n", "data = pd.read_csv(file_name)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "data.head()" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
\n", " | RespondentID | \n", "How often do you travel by plane? | \n", "Do you ever recline your seat when you fly? | \n", "How tall are you? | \n", "Do you have any children under 18? | \n", "In a row of three seats, who should get to use the two arm rests? | \n", "In a row of two seats, who should get to use the middle arm rest? | \n", "Who should have control over the window shade? | \n", "Is itrude to move to an unsold seat on a plane? | \n", "Generally speaking, is it rude to say more than a few words tothe stranger sitting next to you on a plane? | \n", "... | \n", "Is itrude to wake a passenger up if you are trying to walk around? | \n", "In general, is itrude to bring a baby on a plane? | \n", "In general, is it rude to knowingly bring unruly children on a plane? | \n", "Have you ever used personal electronics during take off or landing in violation of a flight attendant's direction? | \n", "Have you ever smoked a cigarette in an airplane bathroom when it was against the rules? | \n", "Gender | \n", "Age | \n", "Household Income | \n", "Education | \n", "Location (Census Region) | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "3436139758 | \n", "Once a year or less | \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", "
1 | \n", "3434278696 | \n", "Once a year or less | \n", "About half the time | \n", "6'3\" | \n", "Yes | \n", "The arm rests should be shared | \n", "The arm rests should be shared | \n", "Everyone in the row should have some say | \n", "No, not rude at all | \n", "No, not at all rude | \n", "... | \n", "No, not at all rude | \n", "No, not at all rude | \n", "No, not at all rude | \n", "No | \n", "No | \n", "Male | \n", "30-44 | \n", "NaN | \n", "Graduate degree | \n", "Pacific | \n", "
2 | \n", "3434275578 | \n", "Once a year or less | \n", "Usually | \n", "5'8\" | \n", "No | \n", "Whoever puts their arm on the arm rest first | \n", "The arm rests should be shared | \n", "The person in the window seat should have excl... | \n", "No, not rude at all | \n", "No, not at all rude | \n", "... | \n", "Yes, somewhat rude | \n", "Yes, somewhat rude | \n", "Yes, very rude | \n", "No | \n", "No | \n", "Male | \n", "30-44 | \n", "$100,000 - $149,999 | \n", "Bachelor degree | \n", "Pacific | \n", "
3 | \n", "3434268208 | \n", "Once a year or less | \n", "Always | \n", "5'11\" | \n", "No | \n", "The arm rests should be shared | \n", "The arm rests should be shared | \n", "Everyone in the row should have some say | \n", "No, not rude at all | \n", "No, not at all rude | \n", "... | \n", "Yes, somewhat rude | \n", "Yes, somewhat rude | \n", "Yes, very rude | \n", "No | \n", "No | \n", "Male | \n", "30-44 | \n", "$0 - $24,999 | \n", "Bachelor degree | \n", "Pacific | \n", "
4 | \n", "3434250245 | \n", "Once a month or less | \n", "About half the time | \n", "5'7\" | \n", "No | \n", "The person in the middle seat gets both arm rests | \n", "The person in aisle | \n", "Everyone in the row should have some say | \n", "No, not rude at all | \n", "No, not at all rude | \n", "... | \n", "Yes, somewhat rude | \n", "Yes, somewhat rude | \n", "Yes, very rude | \n", "Yes | \n", "No | \n", "Male | \n", "30-44 | \n", "$50,000 - $99,999 | \n", "Bachelor degree | \n", "Pacific | \n", "
5 rows \u00d7 27 columns
\n", "