{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"\n",
"___\n",
"
Copyright by Pierian Data Inc.\n",
"For more information, visit us at www.pieriandata.com"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Conditional Filtering"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df = pd.read_csv('tips.csv')"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 16.99 | \n",
" 1.01 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 8.49 | \n",
" Christy Cunningham | \n",
" 3560325168603410 | \n",
" Sun2959 | \n",
"
\n",
" \n",
" 1 | \n",
" 10.34 | \n",
" 1.66 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.45 | \n",
" Douglas Tucker | \n",
" 4478071379779230 | \n",
" Sun4608 | \n",
"
\n",
" \n",
" 2 | \n",
" 21.01 | \n",
" 3.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 7.00 | \n",
" Travis Walters | \n",
" 6011812112971322 | \n",
" Sun4458 | \n",
"
\n",
" \n",
" 3 | \n",
" 23.68 | \n",
" 3.31 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 11.84 | \n",
" Nathaniel Harris | \n",
" 4676137647685994 | \n",
" Sun5260 | \n",
"
\n",
" \n",
" 4 | \n",
" 24.59 | \n",
" 3.61 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.15 | \n",
" Tonya Carter | \n",
" 4832732618637221 | \n",
" Sun2251 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"0 16.99 1.01 Female No Sun Dinner 2 8.49 \n",
"1 10.34 1.66 Male No Sun Dinner 3 3.45 \n",
"2 21.01 3.50 Male No Sun Dinner 3 7.00 \n",
"3 23.68 3.31 Male No Sun Dinner 2 11.84 \n",
"4 24.59 3.61 Female No Sun Dinner 4 6.15 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"0 Christy Cunningham 3560325168603410 Sun2959 \n",
"1 Douglas Tucker 4478071379779230 Sun4608 \n",
"2 Travis Walters 6011812112971322 Sun4458 \n",
"3 Nathaniel Harris 4676137647685994 Sun5260 \n",
"4 Tonya Carter 4832732618637221 Sun2251 "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conditions"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# df['total_bill'] > 30"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"bool_series = df['total_bill'] > 30"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 39 | \n",
" 31.27 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.42 | \n",
" Mr. Brandon Berry | \n",
" 6011525851069856 | \n",
" Sat6373 | \n",
"
\n",
" \n",
" 44 | \n",
" 30.40 | \n",
" 5.60 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.60 | \n",
" Todd Cooper | \n",
" 503846761263 | \n",
" Sun2274 | \n",
"
\n",
" \n",
" 47 | \n",
" 32.40 | \n",
" 6.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.10 | \n",
" James Barnes | \n",
" 3552002592874186 | \n",
" Sun9677 | \n",
"
\n",
" \n",
" 52 | \n",
" 34.81 | \n",
" 5.20 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.70 | \n",
" Emily Daniel | \n",
" 4291280793094374 | \n",
" Sun6165 | \n",
"
\n",
" \n",
" 56 | \n",
" 38.01 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.50 | \n",
" James Christensen DDS | \n",
" 349793629453226 | \n",
" Sat8903 | \n",
"
\n",
" \n",
" 59 | \n",
" 48.27 | \n",
" 6.73 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.07 | \n",
" Brian Ortiz | \n",
" 6596453823950595 | \n",
" Sat8139 | \n",
"
\n",
" \n",
" 83 | \n",
" 32.68 | \n",
" 5.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 16.34 | \n",
" Daniel Murphy | \n",
" 5356177501009133 | \n",
" Thur8801 | \n",
"
\n",
" \n",
" 85 | \n",
" 34.83 | \n",
" 5.17 | \n",
" Female | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 8.71 | \n",
" Shawna Cook | \n",
" 6011787464177340 | \n",
" Thur7972 | \n",
"
\n",
" \n",
" 95 | \n",
" 40.17 | \n",
" 4.73 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Dinner | \n",
" 4 | \n",
" 10.04 | \n",
" Aaron Bentley | \n",
" 180026611638690 | \n",
" Fri9628 | \n",
"
\n",
" \n",
" 102 | \n",
" 44.30 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 14.77 | \n",
" Heather Cohen | \n",
" 379771118886604 | \n",
" Sat6240 | \n",
"
\n",
" \n",
" 112 | \n",
" 38.07 | \n",
" 4.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 12.69 | \n",
" Jeff Lopez | \n",
" 3572865915176463 | \n",
" Sun591 | \n",
"
\n",
" \n",
" 141 | \n",
" 34.30 | \n",
" 6.70 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 6 | \n",
" 5.72 | \n",
" Steven Carlson | \n",
" 3526515703718508 | \n",
" Thur1025 | \n",
"
\n",
" \n",
" 142 | \n",
" 41.19 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 5 | \n",
" 8.24 | \n",
" Eric Andrews | \n",
" 4356531761046453 | \n",
" Thur3621 | \n",
"
\n",
" \n",
" 156 | \n",
" 48.17 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 6 | \n",
" 8.03 | \n",
" Ryan Gonzales | \n",
" 3523151482063321 | \n",
" Sun7518 | \n",
"
\n",
" \n",
" 167 | \n",
" 31.71 | \n",
" 4.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.93 | \n",
" Michael Lawson | \n",
" 3566285921227119 | \n",
" Sun3719 | \n",
"
\n",
" \n",
" 170 | \n",
" 50.81 | \n",
" 10.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 16.94 | \n",
" Gregory Clark | \n",
" 5473850968388236 | \n",
" Sat1954 | \n",
"
\n",
" \n",
" 173 | \n",
" 31.85 | \n",
" 3.18 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 15.92 | \n",
" Scott Perez | \n",
" 3577115550328507 | \n",
" Sun9335 | \n",
"
\n",
" \n",
" 175 | \n",
" 32.90 | \n",
" 3.11 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 16.45 | \n",
" Nathan Reynolds | \n",
" 370307040837149 | \n",
" Sun5109 | \n",
"
\n",
" \n",
" 179 | \n",
" 34.63 | \n",
" 3.55 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 17.32 | \n",
" Brian Bailey | \n",
" 346656312114848 | \n",
" Sun9851 | \n",
"
\n",
" \n",
" 180 | \n",
" 34.65 | \n",
" 3.68 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.66 | \n",
" James Hebert DDS | \n",
" 676168737648 | \n",
" Sun7544 | \n",
"
\n",
" \n",
" 182 | \n",
" 45.35 | \n",
" 3.50 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 15.12 | \n",
" Jose Parsons | \n",
" 4112207559459910 | \n",
" Sun2337 | \n",
"
\n",
" \n",
" 184 | \n",
" 40.55 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 20.27 | \n",
" Stephen Cox | \n",
" 3547798222044029 | \n",
" Sun5140 | \n",
"
\n",
" \n",
" 187 | \n",
" 30.46 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 5 | \n",
" 6.09 | \n",
" David Barrett | \n",
" 4792882899700988 | \n",
" Sun9987 | \n",
"
\n",
" \n",
" 197 | \n",
" 43.11 | \n",
" 5.00 | \n",
" Female | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 10.78 | \n",
" Brooke Soto | \n",
" 5544902205760175 | \n",
" Thur9313 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"39 31.27 5.00 Male No Sat Dinner 3 10.42 \n",
"44 30.40 5.60 Male No Sun Dinner 4 7.60 \n",
"47 32.40 6.00 Male No Sun Dinner 4 8.10 \n",
"52 34.81 5.20 Female No Sun Dinner 4 8.70 \n",
"56 38.01 3.00 Male Yes Sat Dinner 4 9.50 \n",
"59 48.27 6.73 Male No Sat Dinner 4 12.07 \n",
"83 32.68 5.00 Male Yes Thur Lunch 2 16.34 \n",
"85 34.83 5.17 Female No Thur Lunch 4 8.71 \n",
"95 40.17 4.73 Male Yes Fri Dinner 4 10.04 \n",
"102 44.30 2.50 Female Yes Sat Dinner 3 14.77 \n",
"112 38.07 4.00 Male No Sun Dinner 3 12.69 \n",
"141 34.30 6.70 Male No Thur Lunch 6 5.72 \n",
"142 41.19 5.00 Male No Thur Lunch 5 8.24 \n",
"156 48.17 5.00 Male No Sun Dinner 6 8.03 \n",
"167 31.71 4.50 Male No Sun Dinner 4 7.93 \n",
"170 50.81 10.00 Male Yes Sat Dinner 3 16.94 \n",
"173 31.85 3.18 Male Yes Sun Dinner 2 15.92 \n",
"175 32.90 3.11 Male Yes Sun Dinner 2 16.45 \n",
"179 34.63 3.55 Male Yes Sun Dinner 2 17.32 \n",
"180 34.65 3.68 Male Yes Sun Dinner 4 8.66 \n",
"182 45.35 3.50 Male Yes Sun Dinner 3 15.12 \n",
"184 40.55 3.00 Male Yes Sun Dinner 2 20.27 \n",
"187 30.46 2.00 Male Yes Sun Dinner 5 6.09 \n",
"197 43.11 5.00 Female Yes Thur Lunch 4 10.78 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"39 Mr. Brandon Berry 6011525851069856 Sat6373 \n",
"44 Todd Cooper 503846761263 Sun2274 \n",
"47 James Barnes 3552002592874186 Sun9677 \n",
"52 Emily Daniel 4291280793094374 Sun6165 \n",
"56 James Christensen DDS 349793629453226 Sat8903 \n",
"59 Brian Ortiz 6596453823950595 Sat8139 \n",
"83 Daniel Murphy 5356177501009133 Thur8801 \n",
"85 Shawna Cook 6011787464177340 Thur7972 \n",
"95 Aaron Bentley 180026611638690 Fri9628 \n",
"102 Heather Cohen 379771118886604 Sat6240 \n",
"112 Jeff Lopez 3572865915176463 Sun591 \n",
"141 Steven Carlson 3526515703718508 Thur1025 \n",
"142 Eric Andrews 4356531761046453 Thur3621 \n",
"156 Ryan Gonzales 3523151482063321 Sun7518 \n",
"167 Michael Lawson 3566285921227119 Sun3719 \n",
"170 Gregory Clark 5473850968388236 Sat1954 \n",
"173 Scott Perez 3577115550328507 Sun9335 \n",
"175 Nathan Reynolds 370307040837149 Sun5109 \n",
"179 Brian Bailey 346656312114848 Sun9851 \n",
"180 James Hebert DDS 676168737648 Sun7544 \n",
"182 Jose Parsons 4112207559459910 Sun2337 \n",
"184 Stephen Cox 3547798222044029 Sun5140 \n",
"187 David Barrett 4792882899700988 Sun9987 \n",
"197 Brooke Soto 5544902205760175 Thur9313 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"237 Thomas Brown 4284722681265508 Sat2929 \n",
"238 Kimberly Crane 676184013727 Sat9777 "
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[bool_series]"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 39 | \n",
" 31.27 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.42 | \n",
" Mr. Brandon Berry | \n",
" 6011525851069856 | \n",
" Sat6373 | \n",
"
\n",
" \n",
" 44 | \n",
" 30.40 | \n",
" 5.60 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.60 | \n",
" Todd Cooper | \n",
" 503846761263 | \n",
" Sun2274 | \n",
"
\n",
" \n",
" 47 | \n",
" 32.40 | \n",
" 6.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.10 | \n",
" James Barnes | \n",
" 3552002592874186 | \n",
" Sun9677 | \n",
"
\n",
" \n",
" 52 | \n",
" 34.81 | \n",
" 5.20 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.70 | \n",
" Emily Daniel | \n",
" 4291280793094374 | \n",
" Sun6165 | \n",
"
\n",
" \n",
" 56 | \n",
" 38.01 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.50 | \n",
" James Christensen DDS | \n",
" 349793629453226 | \n",
" Sat8903 | \n",
"
\n",
" \n",
" 59 | \n",
" 48.27 | \n",
" 6.73 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.07 | \n",
" Brian Ortiz | \n",
" 6596453823950595 | \n",
" Sat8139 | \n",
"
\n",
" \n",
" 83 | \n",
" 32.68 | \n",
" 5.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 16.34 | \n",
" Daniel Murphy | \n",
" 5356177501009133 | \n",
" Thur8801 | \n",
"
\n",
" \n",
" 85 | \n",
" 34.83 | \n",
" 5.17 | \n",
" Female | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 8.71 | \n",
" Shawna Cook | \n",
" 6011787464177340 | \n",
" Thur7972 | \n",
"
\n",
" \n",
" 95 | \n",
" 40.17 | \n",
" 4.73 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Dinner | \n",
" 4 | \n",
" 10.04 | \n",
" Aaron Bentley | \n",
" 180026611638690 | \n",
" Fri9628 | \n",
"
\n",
" \n",
" 102 | \n",
" 44.30 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 14.77 | \n",
" Heather Cohen | \n",
" 379771118886604 | \n",
" Sat6240 | \n",
"
\n",
" \n",
" 112 | \n",
" 38.07 | \n",
" 4.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 12.69 | \n",
" Jeff Lopez | \n",
" 3572865915176463 | \n",
" Sun591 | \n",
"
\n",
" \n",
" 141 | \n",
" 34.30 | \n",
" 6.70 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 6 | \n",
" 5.72 | \n",
" Steven Carlson | \n",
" 3526515703718508 | \n",
" Thur1025 | \n",
"
\n",
" \n",
" 142 | \n",
" 41.19 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 5 | \n",
" 8.24 | \n",
" Eric Andrews | \n",
" 4356531761046453 | \n",
" Thur3621 | \n",
"
\n",
" \n",
" 156 | \n",
" 48.17 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 6 | \n",
" 8.03 | \n",
" Ryan Gonzales | \n",
" 3523151482063321 | \n",
" Sun7518 | \n",
"
\n",
" \n",
" 167 | \n",
" 31.71 | \n",
" 4.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.93 | \n",
" Michael Lawson | \n",
" 3566285921227119 | \n",
" Sun3719 | \n",
"
\n",
" \n",
" 170 | \n",
" 50.81 | \n",
" 10.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 16.94 | \n",
" Gregory Clark | \n",
" 5473850968388236 | \n",
" Sat1954 | \n",
"
\n",
" \n",
" 173 | \n",
" 31.85 | \n",
" 3.18 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 15.92 | \n",
" Scott Perez | \n",
" 3577115550328507 | \n",
" Sun9335 | \n",
"
\n",
" \n",
" 175 | \n",
" 32.90 | \n",
" 3.11 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 16.45 | \n",
" Nathan Reynolds | \n",
" 370307040837149 | \n",
" Sun5109 | \n",
"
\n",
" \n",
" 179 | \n",
" 34.63 | \n",
" 3.55 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 17.32 | \n",
" Brian Bailey | \n",
" 346656312114848 | \n",
" Sun9851 | \n",
"
\n",
" \n",
" 180 | \n",
" 34.65 | \n",
" 3.68 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.66 | \n",
" James Hebert DDS | \n",
" 676168737648 | \n",
" Sun7544 | \n",
"
\n",
" \n",
" 182 | \n",
" 45.35 | \n",
" 3.50 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 15.12 | \n",
" Jose Parsons | \n",
" 4112207559459910 | \n",
" Sun2337 | \n",
"
\n",
" \n",
" 184 | \n",
" 40.55 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 20.27 | \n",
" Stephen Cox | \n",
" 3547798222044029 | \n",
" Sun5140 | \n",
"
\n",
" \n",
" 187 | \n",
" 30.46 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 5 | \n",
" 6.09 | \n",
" David Barrett | \n",
" 4792882899700988 | \n",
" Sun9987 | \n",
"
\n",
" \n",
" 197 | \n",
" 43.11 | \n",
" 5.00 | \n",
" Female | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 10.78 | \n",
" Brooke Soto | \n",
" 5544902205760175 | \n",
" Thur9313 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"39 31.27 5.00 Male No Sat Dinner 3 10.42 \n",
"44 30.40 5.60 Male No Sun Dinner 4 7.60 \n",
"47 32.40 6.00 Male No Sun Dinner 4 8.10 \n",
"52 34.81 5.20 Female No Sun Dinner 4 8.70 \n",
"56 38.01 3.00 Male Yes Sat Dinner 4 9.50 \n",
"59 48.27 6.73 Male No Sat Dinner 4 12.07 \n",
"83 32.68 5.00 Male Yes Thur Lunch 2 16.34 \n",
"85 34.83 5.17 Female No Thur Lunch 4 8.71 \n",
"95 40.17 4.73 Male Yes Fri Dinner 4 10.04 \n",
"102 44.30 2.50 Female Yes Sat Dinner 3 14.77 \n",
"112 38.07 4.00 Male No Sun Dinner 3 12.69 \n",
"141 34.30 6.70 Male No Thur Lunch 6 5.72 \n",
"142 41.19 5.00 Male No Thur Lunch 5 8.24 \n",
"156 48.17 5.00 Male No Sun Dinner 6 8.03 \n",
"167 31.71 4.50 Male No Sun Dinner 4 7.93 \n",
"170 50.81 10.00 Male Yes Sat Dinner 3 16.94 \n",
"173 31.85 3.18 Male Yes Sun Dinner 2 15.92 \n",
"175 32.90 3.11 Male Yes Sun Dinner 2 16.45 \n",
"179 34.63 3.55 Male Yes Sun Dinner 2 17.32 \n",
"180 34.65 3.68 Male Yes Sun Dinner 4 8.66 \n",
"182 45.35 3.50 Male Yes Sun Dinner 3 15.12 \n",
"184 40.55 3.00 Male Yes Sun Dinner 2 20.27 \n",
"187 30.46 2.00 Male Yes Sun Dinner 5 6.09 \n",
"197 43.11 5.00 Female Yes Thur Lunch 4 10.78 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"39 Mr. Brandon Berry 6011525851069856 Sat6373 \n",
"44 Todd Cooper 503846761263 Sun2274 \n",
"47 James Barnes 3552002592874186 Sun9677 \n",
"52 Emily Daniel 4291280793094374 Sun6165 \n",
"56 James Christensen DDS 349793629453226 Sat8903 \n",
"59 Brian Ortiz 6596453823950595 Sat8139 \n",
"83 Daniel Murphy 5356177501009133 Thur8801 \n",
"85 Shawna Cook 6011787464177340 Thur7972 \n",
"95 Aaron Bentley 180026611638690 Fri9628 \n",
"102 Heather Cohen 379771118886604 Sat6240 \n",
"112 Jeff Lopez 3572865915176463 Sun591 \n",
"141 Steven Carlson 3526515703718508 Thur1025 \n",
"142 Eric Andrews 4356531761046453 Thur3621 \n",
"156 Ryan Gonzales 3523151482063321 Sun7518 \n",
"167 Michael Lawson 3566285921227119 Sun3719 \n",
"170 Gregory Clark 5473850968388236 Sat1954 \n",
"173 Scott Perez 3577115550328507 Sun9335 \n",
"175 Nathan Reynolds 370307040837149 Sun5109 \n",
"179 Brian Bailey 346656312114848 Sun9851 \n",
"180 James Hebert DDS 676168737648 Sun7544 \n",
"182 Jose Parsons 4112207559459910 Sun2337 \n",
"184 Stephen Cox 3547798222044029 Sun5140 \n",
"187 David Barrett 4792882899700988 Sun9987 \n",
"197 Brooke Soto 5544902205760175 Thur9313 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"237 Thomas Brown 4284722681265508 Sat2929 \n",
"238 Kimberly Crane 676184013727 Sat9777 "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[df['total_bill']>30]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 1 | \n",
" 10.34 | \n",
" 1.66 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.45 | \n",
" Douglas Tucker | \n",
" 4478071379779230 | \n",
" Sun4608 | \n",
"
\n",
" \n",
" 2 | \n",
" 21.01 | \n",
" 3.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 7.00 | \n",
" Travis Walters | \n",
" 6011812112971322 | \n",
" Sun4458 | \n",
"
\n",
" \n",
" 3 | \n",
" 23.68 | \n",
" 3.31 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 11.84 | \n",
" Nathaniel Harris | \n",
" 4676137647685994 | \n",
" Sun5260 | \n",
"
\n",
" \n",
" 5 | \n",
" 25.29 | \n",
" 4.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.32 | \n",
" Erik Smith | \n",
" 213140353657882 | \n",
" Sun9679 | \n",
"
\n",
" \n",
" 6 | \n",
" 8.77 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 4.38 | \n",
" Kristopher Johnson | \n",
" 2223727524230344 | \n",
" Sun5985 | \n",
"
\n",
" \n",
" 7 | \n",
" 26.88 | \n",
" 3.12 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.72 | \n",
" Robert Buck | \n",
" 3514785077705092 | \n",
" Sun8157 | \n",
"
\n",
" \n",
" 8 | \n",
" 15.04 | \n",
" 1.96 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.52 | \n",
" Joseph Mcdonald | \n",
" 3522866365840377 | \n",
" Sun6820 | \n",
"
\n",
" \n",
" 9 | \n",
" 14.78 | \n",
" 3.23 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.39 | \n",
" Jerome Abbott | \n",
" 3532124519049786 | \n",
" Sun3775 | \n",
"
\n",
" \n",
" 10 | \n",
" 10.27 | \n",
" 1.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 5.14 | \n",
" William Riley | \n",
" 566287581219 | \n",
" Sun2546 | \n",
"
\n",
" \n",
" 12 | \n",
" 15.42 | \n",
" 1.57 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.71 | \n",
" Chad Harrington | \n",
" 577040572932 | \n",
" Sun1300 | \n",
"
\n",
" \n",
" 13 | \n",
" 18.43 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 4.61 | \n",
" Joshua Jones | \n",
" 6011163105616890 | \n",
" Sun2971 | \n",
"
\n",
" \n",
" 15 | \n",
" 21.58 | \n",
" 3.92 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 10.79 | \n",
" Matthew Reilly | \n",
" 180073029785069 | \n",
" Sun1878 | \n",
"
\n",
" \n",
" 17 | \n",
" 16.29 | \n",
" 3.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 5.43 | \n",
" John Pittman | \n",
" 6521340257218708 | \n",
" Sun2998 | \n",
"
\n",
" \n",
" 19 | \n",
" 20.65 | \n",
" 3.35 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 6.88 | \n",
" Timothy Oneal | \n",
" 6568069240986485 | \n",
" Sat9213 | \n",
"
\n",
" \n",
" 20 | \n",
" 17.92 | \n",
" 4.08 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.96 | \n",
" Thomas Rice | \n",
" 4403296224639756 | \n",
" Sat1709 | \n",
"
\n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 24 | \n",
" 19.82 | \n",
" 3.18 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 9.91 | \n",
" Christopher Ross | \n",
" 36739148167928 | \n",
" Sat6236 | \n",
"
\n",
" \n",
" 25 | \n",
" 17.81 | \n",
" 2.34 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 4.45 | \n",
" Robert Perkins | \n",
" 30502930499388 | \n",
" Sat907 | \n",
"
\n",
" \n",
" 26 | \n",
" 13.37 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.68 | \n",
" Kyle Avery | \n",
" 6531339539615499 | \n",
" Sat6651 | \n",
"
\n",
" \n",
" 27 | \n",
" 12.69 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.34 | \n",
" Patrick Barber | \n",
" 30155551880343 | \n",
" Sat394 | \n",
"
\n",
" \n",
" 28 | \n",
" 21.70 | \n",
" 4.30 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 10.85 | \n",
" David Collier | \n",
" 5529694315416009 | \n",
" Sat3697 | \n",
"
\n",
" \n",
" 30 | \n",
" 9.55 | \n",
" 1.45 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 4.78 | \n",
" Grant Hall | \n",
" 30196517521548 | \n",
" Sat4099 | \n",
"
\n",
" \n",
" 31 | \n",
" 18.35 | \n",
" 2.50 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 4.59 | \n",
" Danny Santiago | \n",
" 630415546013 | \n",
" Sat4947 | \n",
"
\n",
" \n",
" 34 | \n",
" 17.78 | \n",
" 3.27 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.89 | \n",
" Jacob Castillo | \n",
" 3551492000704805 | \n",
" Sat8124 | \n",
"
\n",
" \n",
" 35 | \n",
" 24.06 | \n",
" 3.60 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 8.02 | \n",
" Joseph Mullins | \n",
" 5519770449260299 | \n",
" Sat632 | \n",
"
\n",
" \n",
" 36 | \n",
" 16.31 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 5.44 | \n",
" William Ford | \n",
" 3527691170179398 | \n",
" Sat9139 | \n",
"
\n",
" \n",
" 38 | \n",
" 18.69 | \n",
" 2.31 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 6.23 | \n",
" Brandon Bradley | \n",
" 4427601595688633 | \n",
" Sat4056 | \n",
"
\n",
" \n",
" 39 | \n",
" 31.27 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.42 | \n",
" Mr. Brandon Berry | \n",
" 6011525851069856 | \n",
" Sat6373 | \n",
"
\n",
" \n",
" 40 | \n",
" 16.04 | \n",
" 2.24 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 5.35 | \n",
" Adam Edwards | \n",
" 3544447755679420 | \n",
" Sat8549 | \n",
"
\n",
" \n",
" 41 | \n",
" 17.46 | \n",
" 2.54 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 8.73 | \n",
" David Boyer | \n",
" 3536678244278149 | \n",
" Sun9460 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 195 | \n",
" 7.56 | \n",
" 1.44 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 3.78 | \n",
" Michael White | \n",
" 4865390263095532 | \n",
" Thur697 | \n",
"
\n",
" \n",
" 196 | \n",
" 10.34 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 5.17 | \n",
" Eric Martin | \n",
" 30442491190342 | \n",
" Thur9862 | \n",
"
\n",
" \n",
" 199 | \n",
" 13.51 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 6.76 | \n",
" Joseph Murphy MD | \n",
" 6547218923471275 | \n",
" Thur2428 | \n",
"
\n",
" \n",
" 200 | \n",
" 18.71 | \n",
" 4.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 3 | \n",
" 6.24 | \n",
" Jason Conrad | \n",
" 4581233003487 | \n",
" Thur6048 | \n",
"
\n",
" \n",
" 204 | \n",
" 20.53 | \n",
" 4.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 5.13 | \n",
" Scott Kim | \n",
" 3570611756827620 | \n",
" Thur2160 | \n",
"
\n",
" \n",
" 206 | \n",
" 26.59 | \n",
" 3.41 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 8.86 | \n",
" Daniel Owens | \n",
" 38971087967574 | \n",
" Sat1 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 208 | \n",
" 24.27 | \n",
" 2.03 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 12.14 | \n",
" Jason Carter | \n",
" 4268942915626180 | \n",
" Sat6048 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 211 | \n",
" 25.89 | \n",
" 5.16 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.47 | \n",
" Christopher Li | \n",
" 6011962464150569 | \n",
" Sat6735 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 216 | \n",
" 28.15 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 5 | \n",
" 5.63 | \n",
" Shawn Barnett PhD | \n",
" 4590982568244 | \n",
" Sat7320 | \n",
"
\n",
" \n",
" 217 | \n",
" 11.59 | \n",
" 1.50 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" Gary Orr | \n",
" 30324521283406 | \n",
" Sat8489 | \n",
"
\n",
" \n",
" 218 | \n",
" 7.74 | \n",
" 1.44 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 3.87 | \n",
" Nicholas Archer | \n",
" 340517153733524 | \n",
" Sat4772 | \n",
"
\n",
" \n",
" 220 | \n",
" 12.16 | \n",
" 2.20 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Lunch | \n",
" 2 | \n",
" 6.08 | \n",
" Ricky Johnson | \n",
" 213109508670736 | \n",
" Fri4607 | \n",
"
\n",
" \n",
" 222 | \n",
" 8.58 | \n",
" 1.92 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Lunch | \n",
" 1 | \n",
" 8.58 | \n",
" Jason Lawrence | \n",
" 3505302934650403 | \n",
" Fri6624 | \n",
"
\n",
" \n",
" 224 | \n",
" 13.42 | \n",
" 1.58 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Lunch | \n",
" 2 | \n",
" 6.71 | \n",
" Ronald Vaughn DVM | \n",
" 341503466406403 | \n",
" Fri5959 | \n",
"
\n",
" \n",
" 227 | \n",
" 20.45 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 5.11 | \n",
" Robert Bradley | \n",
" 213141668145910 | \n",
" Sat4319 | \n",
"
\n",
" \n",
" 228 | \n",
" 13.28 | \n",
" 2.72 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.64 | \n",
" Glenn Jones | \n",
" 502061651712 | \n",
" Sat2937 | \n",
"
\n",
" \n",
" 230 | \n",
" 24.01 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.00 | \n",
" Michael Osborne | \n",
" 4258682154026 | \n",
" Sat7872 | \n",
"
\n",
" \n",
" 231 | \n",
" 15.69 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 5.23 | \n",
" Jason Parks | \n",
" 4812333796161 | \n",
" Sat6334 | \n",
"
\n",
" \n",
" 232 | \n",
" 11.61 | \n",
" 3.39 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" James Taylor | \n",
" 6011482917327995 | \n",
" Sat2124 | \n",
"
\n",
" \n",
" 233 | \n",
" 10.77 | \n",
" 1.47 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.38 | \n",
" Paul Novak | \n",
" 6011698897610858 | \n",
" Sat1467 | \n",
"
\n",
" \n",
" 234 | \n",
" 15.53 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 7.76 | \n",
" Tracy Douglas | \n",
" 4097938155941930 | \n",
" Sat7220 | \n",
"
\n",
" \n",
" 235 | \n",
" 10.07 | \n",
" 1.25 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.04 | \n",
" Sean Gonzalez | \n",
" 3534021246117605 | \n",
" Sat4615 | \n",
"
\n",
" \n",
" 236 | \n",
" 12.60 | \n",
" 1.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.30 | \n",
" Matthew Myers | \n",
" 3543676378973965 | \n",
" Sat5032 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
" 239 | \n",
" 29.03 | \n",
" 5.92 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 9.68 | \n",
" Michael Avila | \n",
" 5296068606052842 | \n",
" Sat2657 | \n",
"
\n",
" \n",
" 241 | \n",
" 22.67 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 11.34 | \n",
" Keith Wong | \n",
" 6011891618747196 | \n",
" Sat3880 | \n",
"
\n",
" \n",
" 242 | \n",
" 17.82 | \n",
" 1.75 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.91 | \n",
" Dennis Dixon | \n",
" 4375220550950 | \n",
" Sat17 | \n",
"
\n",
" \n",
"
\n",
"
157 rows × 11 columns
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"1 10.34 1.66 Male No Sun Dinner 3 3.45 \n",
"2 21.01 3.50 Male No Sun Dinner 3 7.00 \n",
"3 23.68 3.31 Male No Sun Dinner 2 11.84 \n",
"5 25.29 4.71 Male No Sun Dinner 4 6.32 \n",
"6 8.77 2.00 Male No Sun Dinner 2 4.38 \n",
"7 26.88 3.12 Male No Sun Dinner 4 6.72 \n",
"8 15.04 1.96 Male No Sun Dinner 2 7.52 \n",
"9 14.78 3.23 Male No Sun Dinner 2 7.39 \n",
"10 10.27 1.71 Male No Sun Dinner 2 5.14 \n",
"12 15.42 1.57 Male No Sun Dinner 2 7.71 \n",
"13 18.43 3.00 Male No Sun Dinner 4 4.61 \n",
"15 21.58 3.92 Male No Sun Dinner 2 10.79 \n",
"17 16.29 3.71 Male No Sun Dinner 3 5.43 \n",
"19 20.65 3.35 Male No Sat Dinner 3 6.88 \n",
"20 17.92 4.08 Male No Sat Dinner 2 8.96 \n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"24 19.82 3.18 Male No Sat Dinner 2 9.91 \n",
"25 17.81 2.34 Male No Sat Dinner 4 4.45 \n",
"26 13.37 2.00 Male No Sat Dinner 2 6.68 \n",
"27 12.69 2.00 Male No Sat Dinner 2 6.34 \n",
"28 21.70 4.30 Male No Sat Dinner 2 10.85 \n",
"30 9.55 1.45 Male No Sat Dinner 2 4.78 \n",
"31 18.35 2.50 Male No Sat Dinner 4 4.59 \n",
"34 17.78 3.27 Male No Sat Dinner 2 8.89 \n",
"35 24.06 3.60 Male No Sat Dinner 3 8.02 \n",
"36 16.31 2.00 Male No Sat Dinner 3 5.44 \n",
"38 18.69 2.31 Male No Sat Dinner 3 6.23 \n",
"39 31.27 5.00 Male No Sat Dinner 3 10.42 \n",
"40 16.04 2.24 Male No Sat Dinner 3 5.35 \n",
"41 17.46 2.54 Male No Sun Dinner 2 8.73 \n",
".. ... ... ... ... ... ... ... ... \n",
"195 7.56 1.44 Male No Thur Lunch 2 3.78 \n",
"196 10.34 2.00 Male Yes Thur Lunch 2 5.17 \n",
"199 13.51 2.00 Male Yes Thur Lunch 2 6.76 \n",
"200 18.71 4.00 Male Yes Thur Lunch 3 6.24 \n",
"204 20.53 4.00 Male Yes Thur Lunch 4 5.13 \n",
"206 26.59 3.41 Male Yes Sat Dinner 3 8.86 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"208 24.27 2.03 Male Yes Sat Dinner 2 12.14 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"211 25.89 5.16 Male Yes Sat Dinner 4 6.47 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"216 28.15 3.00 Male Yes Sat Dinner 5 5.63 \n",
"217 11.59 1.50 Male Yes Sat Dinner 2 5.80 \n",
"218 7.74 1.44 Male Yes Sat Dinner 2 3.87 \n",
"220 12.16 2.20 Male Yes Fri Lunch 2 6.08 \n",
"222 8.58 1.92 Male Yes Fri Lunch 1 8.58 \n",
"224 13.42 1.58 Male Yes Fri Lunch 2 6.71 \n",
"227 20.45 3.00 Male No Sat Dinner 4 5.11 \n",
"228 13.28 2.72 Male No Sat Dinner 2 6.64 \n",
"230 24.01 2.00 Male Yes Sat Dinner 4 6.00 \n",
"231 15.69 3.00 Male Yes Sat Dinner 3 5.23 \n",
"232 11.61 3.39 Male No Sat Dinner 2 5.80 \n",
"233 10.77 1.47 Male No Sat Dinner 2 5.38 \n",
"234 15.53 3.00 Male Yes Sat Dinner 2 7.76 \n",
"235 10.07 1.25 Male No Sat Dinner 2 5.04 \n",
"236 12.60 1.00 Male Yes Sat Dinner 2 6.30 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"239 29.03 5.92 Male No Sat Dinner 3 9.68 \n",
"241 22.67 2.00 Male Yes Sat Dinner 2 11.34 \n",
"242 17.82 1.75 Male No Sat Dinner 2 8.91 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"1 Douglas Tucker 4478071379779230 Sun4608 \n",
"2 Travis Walters 6011812112971322 Sun4458 \n",
"3 Nathaniel Harris 4676137647685994 Sun5260 \n",
"5 Erik Smith 213140353657882 Sun9679 \n",
"6 Kristopher Johnson 2223727524230344 Sun5985 \n",
"7 Robert Buck 3514785077705092 Sun8157 \n",
"8 Joseph Mcdonald 3522866365840377 Sun6820 \n",
"9 Jerome Abbott 3532124519049786 Sun3775 \n",
"10 William Riley 566287581219 Sun2546 \n",
"12 Chad Harrington 577040572932 Sun1300 \n",
"13 Joshua Jones 6011163105616890 Sun2971 \n",
"15 Matthew Reilly 180073029785069 Sun1878 \n",
"17 John Pittman 6521340257218708 Sun2998 \n",
"19 Timothy Oneal 6568069240986485 Sat9213 \n",
"20 Thomas Rice 4403296224639756 Sat1709 \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"24 Christopher Ross 36739148167928 Sat6236 \n",
"25 Robert Perkins 30502930499388 Sat907 \n",
"26 Kyle Avery 6531339539615499 Sat6651 \n",
"27 Patrick Barber 30155551880343 Sat394 \n",
"28 David Collier 5529694315416009 Sat3697 \n",
"30 Grant Hall 30196517521548 Sat4099 \n",
"31 Danny Santiago 630415546013 Sat4947 \n",
"34 Jacob Castillo 3551492000704805 Sat8124 \n",
"35 Joseph Mullins 5519770449260299 Sat632 \n",
"36 William Ford 3527691170179398 Sat9139 \n",
"38 Brandon Bradley 4427601595688633 Sat4056 \n",
"39 Mr. Brandon Berry 6011525851069856 Sat6373 \n",
"40 Adam Edwards 3544447755679420 Sat8549 \n",
"41 David Boyer 3536678244278149 Sun9460 \n",
".. ... ... ... \n",
"195 Michael White 4865390263095532 Thur697 \n",
"196 Eric Martin 30442491190342 Thur9862 \n",
"199 Joseph Murphy MD 6547218923471275 Thur2428 \n",
"200 Jason Conrad 4581233003487 Thur6048 \n",
"204 Scott Kim 3570611756827620 Thur2160 \n",
"206 Daniel Owens 38971087967574 Sat1 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"208 Jason Carter 4268942915626180 Sat6048 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"211 Christopher Li 6011962464150569 Sat6735 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"216 Shawn Barnett PhD 4590982568244 Sat7320 \n",
"217 Gary Orr 30324521283406 Sat8489 \n",
"218 Nicholas Archer 340517153733524 Sat4772 \n",
"220 Ricky Johnson 213109508670736 Fri4607 \n",
"222 Jason Lawrence 3505302934650403 Fri6624 \n",
"224 Ronald Vaughn DVM 341503466406403 Fri5959 \n",
"227 Robert Bradley 213141668145910 Sat4319 \n",
"228 Glenn Jones 502061651712 Sat2937 \n",
"230 Michael Osborne 4258682154026 Sat7872 \n",
"231 Jason Parks 4812333796161 Sat6334 \n",
"232 James Taylor 6011482917327995 Sat2124 \n",
"233 Paul Novak 6011698897610858 Sat1467 \n",
"234 Tracy Douglas 4097938155941930 Sat7220 \n",
"235 Sean Gonzalez 3534021246117605 Sat4615 \n",
"236 Matthew Myers 3543676378973965 Sat5032 \n",
"237 Thomas Brown 4284722681265508 Sat2929 \n",
"239 Michael Avila 5296068606052842 Sat2657 \n",
"241 Keith Wong 6011891618747196 Sat3880 \n",
"242 Dennis Dixon 4375220550950 Sat17 \n",
"\n",
"[157 rows x 11 columns]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[df['sex'] == 'Male']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Multiple Conditions\n",
"\n",
"Recall the steps:\n",
"\n",
"* Get the conditions\n",
"* Wrap each condition in parenthesis\n",
"* Use the | or & operator, depending if you want an \n",
" * OR | (either condition is True)\n",
" * AND & (both conditions must be True)\n",
"* You can also use the ~ operator as a NOT operation"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 39 | \n",
" 31.27 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.42 | \n",
" Mr. Brandon Berry | \n",
" 6011525851069856 | \n",
" Sat6373 | \n",
"
\n",
" \n",
" 44 | \n",
" 30.40 | \n",
" 5.60 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.60 | \n",
" Todd Cooper | \n",
" 503846761263 | \n",
" Sun2274 | \n",
"
\n",
" \n",
" 47 | \n",
" 32.40 | \n",
" 6.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.10 | \n",
" James Barnes | \n",
" 3552002592874186 | \n",
" Sun9677 | \n",
"
\n",
" \n",
" 56 | \n",
" 38.01 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.50 | \n",
" James Christensen DDS | \n",
" 349793629453226 | \n",
" Sat8903 | \n",
"
\n",
" \n",
" 59 | \n",
" 48.27 | \n",
" 6.73 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.07 | \n",
" Brian Ortiz | \n",
" 6596453823950595 | \n",
" Sat8139 | \n",
"
\n",
" \n",
" 83 | \n",
" 32.68 | \n",
" 5.00 | \n",
" Male | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 2 | \n",
" 16.34 | \n",
" Daniel Murphy | \n",
" 5356177501009133 | \n",
" Thur8801 | \n",
"
\n",
" \n",
" 95 | \n",
" 40.17 | \n",
" 4.73 | \n",
" Male | \n",
" Yes | \n",
" Fri | \n",
" Dinner | \n",
" 4 | \n",
" 10.04 | \n",
" Aaron Bentley | \n",
" 180026611638690 | \n",
" Fri9628 | \n",
"
\n",
" \n",
" 112 | \n",
" 38.07 | \n",
" 4.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 12.69 | \n",
" Jeff Lopez | \n",
" 3572865915176463 | \n",
" Sun591 | \n",
"
\n",
" \n",
" 141 | \n",
" 34.30 | \n",
" 6.70 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 6 | \n",
" 5.72 | \n",
" Steven Carlson | \n",
" 3526515703718508 | \n",
" Thur1025 | \n",
"
\n",
" \n",
" 142 | \n",
" 41.19 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 5 | \n",
" 8.24 | \n",
" Eric Andrews | \n",
" 4356531761046453 | \n",
" Thur3621 | \n",
"
\n",
" \n",
" 156 | \n",
" 48.17 | \n",
" 5.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 6 | \n",
" 8.03 | \n",
" Ryan Gonzales | \n",
" 3523151482063321 | \n",
" Sun7518 | \n",
"
\n",
" \n",
" 167 | \n",
" 31.71 | \n",
" 4.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 7.93 | \n",
" Michael Lawson | \n",
" 3566285921227119 | \n",
" Sun3719 | \n",
"
\n",
" \n",
" 170 | \n",
" 50.81 | \n",
" 10.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 16.94 | \n",
" Gregory Clark | \n",
" 5473850968388236 | \n",
" Sat1954 | \n",
"
\n",
" \n",
" 173 | \n",
" 31.85 | \n",
" 3.18 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 15.92 | \n",
" Scott Perez | \n",
" 3577115550328507 | \n",
" Sun9335 | \n",
"
\n",
" \n",
" 175 | \n",
" 32.90 | \n",
" 3.11 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 16.45 | \n",
" Nathan Reynolds | \n",
" 370307040837149 | \n",
" Sun5109 | \n",
"
\n",
" \n",
" 179 | \n",
" 34.63 | \n",
" 3.55 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 17.32 | \n",
" Brian Bailey | \n",
" 346656312114848 | \n",
" Sun9851 | \n",
"
\n",
" \n",
" 180 | \n",
" 34.65 | \n",
" 3.68 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.66 | \n",
" James Hebert DDS | \n",
" 676168737648 | \n",
" Sun7544 | \n",
"
\n",
" \n",
" 182 | \n",
" 45.35 | \n",
" 3.50 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 15.12 | \n",
" Jose Parsons | \n",
" 4112207559459910 | \n",
" Sun2337 | \n",
"
\n",
" \n",
" 184 | \n",
" 40.55 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 20.27 | \n",
" Stephen Cox | \n",
" 3547798222044029 | \n",
" Sun5140 | \n",
"
\n",
" \n",
" 187 | \n",
" 30.46 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sun | \n",
" Dinner | \n",
" 5 | \n",
" 6.09 | \n",
" David Barrett | \n",
" 4792882899700988 | \n",
" Sun9987 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"39 31.27 5.00 Male No Sat Dinner 3 10.42 \n",
"44 30.40 5.60 Male No Sun Dinner 4 7.60 \n",
"47 32.40 6.00 Male No Sun Dinner 4 8.10 \n",
"56 38.01 3.00 Male Yes Sat Dinner 4 9.50 \n",
"59 48.27 6.73 Male No Sat Dinner 4 12.07 \n",
"83 32.68 5.00 Male Yes Thur Lunch 2 16.34 \n",
"95 40.17 4.73 Male Yes Fri Dinner 4 10.04 \n",
"112 38.07 4.00 Male No Sun Dinner 3 12.69 \n",
"141 34.30 6.70 Male No Thur Lunch 6 5.72 \n",
"142 41.19 5.00 Male No Thur Lunch 5 8.24 \n",
"156 48.17 5.00 Male No Sun Dinner 6 8.03 \n",
"167 31.71 4.50 Male No Sun Dinner 4 7.93 \n",
"170 50.81 10.00 Male Yes Sat Dinner 3 16.94 \n",
"173 31.85 3.18 Male Yes Sun Dinner 2 15.92 \n",
"175 32.90 3.11 Male Yes Sun Dinner 2 16.45 \n",
"179 34.63 3.55 Male Yes Sun Dinner 2 17.32 \n",
"180 34.65 3.68 Male Yes Sun Dinner 4 8.66 \n",
"182 45.35 3.50 Male Yes Sun Dinner 3 15.12 \n",
"184 40.55 3.00 Male Yes Sun Dinner 2 20.27 \n",
"187 30.46 2.00 Male Yes Sun Dinner 5 6.09 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"39 Mr. Brandon Berry 6011525851069856 Sat6373 \n",
"44 Todd Cooper 503846761263 Sun2274 \n",
"47 James Barnes 3552002592874186 Sun9677 \n",
"56 James Christensen DDS 349793629453226 Sat8903 \n",
"59 Brian Ortiz 6596453823950595 Sat8139 \n",
"83 Daniel Murphy 5356177501009133 Thur8801 \n",
"95 Aaron Bentley 180026611638690 Fri9628 \n",
"112 Jeff Lopez 3572865915176463 Sun591 \n",
"141 Steven Carlson 3526515703718508 Thur1025 \n",
"142 Eric Andrews 4356531761046453 Thur3621 \n",
"156 Ryan Gonzales 3523151482063321 Sun7518 \n",
"167 Michael Lawson 3566285921227119 Sun3719 \n",
"170 Gregory Clark 5473850968388236 Sat1954 \n",
"173 Scott Perez 3577115550328507 Sun9335 \n",
"175 Nathan Reynolds 370307040837149 Sun5109 \n",
"179 Brian Bailey 346656312114848 Sun9851 \n",
"180 James Hebert DDS 676168737648 Sun7544 \n",
"182 Jose Parsons 4112207559459910 Sun2337 \n",
"184 Stephen Cox 3547798222044029 Sun5140 \n",
"187 David Barrett 4792882899700988 Sun9987 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"237 Thomas Brown 4284722681265508 Sat2929 "
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[(df['total_bill'] > 30) & (df['sex']=='Male')]"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 52 | \n",
" 34.81 | \n",
" 5.20 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.70 | \n",
" Emily Daniel | \n",
" 4291280793094374 | \n",
" Sun6165 | \n",
"
\n",
" \n",
" 85 | \n",
" 34.83 | \n",
" 5.17 | \n",
" Female | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 8.71 | \n",
" Shawna Cook | \n",
" 6011787464177340 | \n",
" Thur7972 | \n",
"
\n",
" \n",
" 102 | \n",
" 44.30 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 14.77 | \n",
" Heather Cohen | \n",
" 379771118886604 | \n",
" Sat6240 | \n",
"
\n",
" \n",
" 197 | \n",
" 43.11 | \n",
" 5.00 | \n",
" Female | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 10.78 | \n",
" Brooke Soto | \n",
" 5544902205760175 | \n",
" Thur9313 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"52 34.81 5.20 Female No Sun Dinner 4 8.70 \n",
"85 34.83 5.17 Female No Thur Lunch 4 8.71 \n",
"102 44.30 2.50 Female Yes Sat Dinner 3 14.77 \n",
"197 43.11 5.00 Female Yes Thur Lunch 4 10.78 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"52 Emily Daniel 4291280793094374 Sun6165 \n",
"85 Shawna Cook 6011787464177340 Thur7972 \n",
"102 Heather Cohen 379771118886604 Sat6240 \n",
"197 Brooke Soto 5544902205760175 Thur9313 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"238 Kimberly Crane 676184013727 Sat9777 "
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[(df['total_bill'] > 30) & ~(df['sex']=='Male')]"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 52 | \n",
" 34.81 | \n",
" 5.20 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.70 | \n",
" Emily Daniel | \n",
" 4291280793094374 | \n",
" Sun6165 | \n",
"
\n",
" \n",
" 85 | \n",
" 34.83 | \n",
" 5.17 | \n",
" Female | \n",
" No | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 8.71 | \n",
" Shawna Cook | \n",
" 6011787464177340 | \n",
" Thur7972 | \n",
"
\n",
" \n",
" 102 | \n",
" 44.30 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 14.77 | \n",
" Heather Cohen | \n",
" 379771118886604 | \n",
" Sat6240 | \n",
"
\n",
" \n",
" 197 | \n",
" 43.11 | \n",
" 5.00 | \n",
" Female | \n",
" Yes | \n",
" Thur | \n",
" Lunch | \n",
" 4 | \n",
" 10.78 | \n",
" Brooke Soto | \n",
" 5544902205760175 | \n",
" Thur9313 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"52 34.81 5.20 Female No Sun Dinner 4 8.70 \n",
"85 34.83 5.17 Female No Thur Lunch 4 8.71 \n",
"102 44.30 2.50 Female Yes Sat Dinner 3 14.77 \n",
"197 43.11 5.00 Female Yes Thur Lunch 4 10.78 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"52 Emily Daniel 4291280793094374 Sun6165 \n",
"85 Shawna Cook 6011787464177340 Thur7972 \n",
"102 Heather Cohen 379771118886604 Sat6240 \n",
"197 Brooke Soto 5544902205760175 Thur9313 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"238 Kimberly Crane 676184013727 Sat9777 "
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[(df['total_bill'] > 30) & (df['sex']!='Male')]"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 16.99 | \n",
" 1.01 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 8.49 | \n",
" Christy Cunningham | \n",
" 3560325168603410 | \n",
" Sun2959 | \n",
"
\n",
" \n",
" 1 | \n",
" 10.34 | \n",
" 1.66 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.45 | \n",
" Douglas Tucker | \n",
" 4478071379779230 | \n",
" Sun4608 | \n",
"
\n",
" \n",
" 2 | \n",
" 21.01 | \n",
" 3.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 7.00 | \n",
" Travis Walters | \n",
" 6011812112971322 | \n",
" Sun4458 | \n",
"
\n",
" \n",
" 3 | \n",
" 23.68 | \n",
" 3.31 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 11.84 | \n",
" Nathaniel Harris | \n",
" 4676137647685994 | \n",
" Sun5260 | \n",
"
\n",
" \n",
" 4 | \n",
" 24.59 | \n",
" 3.61 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.15 | \n",
" Tonya Carter | \n",
" 4832732618637221 | \n",
" Sun2251 | \n",
"
\n",
" \n",
" 5 | \n",
" 25.29 | \n",
" 4.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.32 | \n",
" Erik Smith | \n",
" 213140353657882 | \n",
" Sun9679 | \n",
"
\n",
" \n",
" 6 | \n",
" 8.77 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 4.38 | \n",
" Kristopher Johnson | \n",
" 2223727524230344 | \n",
" Sun5985 | \n",
"
\n",
" \n",
" 7 | \n",
" 26.88 | \n",
" 3.12 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.72 | \n",
" Robert Buck | \n",
" 3514785077705092 | \n",
" Sun8157 | \n",
"
\n",
" \n",
" 8 | \n",
" 15.04 | \n",
" 1.96 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.52 | \n",
" Joseph Mcdonald | \n",
" 3522866365840377 | \n",
" Sun6820 | \n",
"
\n",
" \n",
" 9 | \n",
" 14.78 | \n",
" 3.23 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.39 | \n",
" Jerome Abbott | \n",
" 3532124519049786 | \n",
" Sun3775 | \n",
"
\n",
" \n",
" 10 | \n",
" 10.27 | \n",
" 1.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 5.14 | \n",
" William Riley | \n",
" 566287581219 | \n",
" Sun2546 | \n",
"
\n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 12 | \n",
" 15.42 | \n",
" 1.57 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.71 | \n",
" Chad Harrington | \n",
" 577040572932 | \n",
" Sun1300 | \n",
"
\n",
" \n",
" 13 | \n",
" 18.43 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 4.61 | \n",
" Joshua Jones | \n",
" 6011163105616890 | \n",
" Sun2971 | \n",
"
\n",
" \n",
" 14 | \n",
" 14.83 | \n",
" 3.02 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.42 | \n",
" Vanessa Jones | \n",
" 30016702287574 | \n",
" Sun3848 | \n",
"
\n",
" \n",
" 15 | \n",
" 21.58 | \n",
" 3.92 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 10.79 | \n",
" Matthew Reilly | \n",
" 180073029785069 | \n",
" Sun1878 | \n",
"
\n",
" \n",
" 16 | \n",
" 10.33 | \n",
" 1.67 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.44 | \n",
" Elizabeth Foster | \n",
" 4240025044626033 | \n",
" Sun9715 | \n",
"
\n",
" \n",
" 17 | \n",
" 16.29 | \n",
" 3.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 5.43 | \n",
" John Pittman | \n",
" 6521340257218708 | \n",
" Sun2998 | \n",
"
\n",
" \n",
" 18 | \n",
" 16.97 | \n",
" 3.50 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 5.66 | \n",
" Laura Martinez | \n",
" 30422275171379 | \n",
" Sun2789 | \n",
"
\n",
" \n",
" 19 | \n",
" 20.65 | \n",
" 3.35 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 6.88 | \n",
" Timothy Oneal | \n",
" 6568069240986485 | \n",
" Sat9213 | \n",
"
\n",
" \n",
" 20 | \n",
" 17.92 | \n",
" 4.08 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.96 | \n",
" Thomas Rice | \n",
" 4403296224639756 | \n",
" Sat1709 | \n",
"
\n",
" \n",
" 21 | \n",
" 20.29 | \n",
" 2.75 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 10.14 | \n",
" Natalie Gardner | \n",
" 5448125351489749 | \n",
" Sat9618 | \n",
"
\n",
" \n",
" 22 | \n",
" 15.77 | \n",
" 2.23 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 7.88 | \n",
" Ashley Shelton | \n",
" 3524119516293213 | \n",
" Sat9786 | \n",
"
\n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 24 | \n",
" 19.82 | \n",
" 3.18 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 9.91 | \n",
" Christopher Ross | \n",
" 36739148167928 | \n",
" Sat6236 | \n",
"
\n",
" \n",
" 25 | \n",
" 17.81 | \n",
" 2.34 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 4.45 | \n",
" Robert Perkins | \n",
" 30502930499388 | \n",
" Sat907 | \n",
"
\n",
" \n",
" 26 | \n",
" 13.37 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.68 | \n",
" Kyle Avery | \n",
" 6531339539615499 | \n",
" Sat6651 | \n",
"
\n",
" \n",
" 27 | \n",
" 12.69 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.34 | \n",
" Patrick Barber | \n",
" 30155551880343 | \n",
" Sat394 | \n",
"
\n",
" \n",
" 28 | \n",
" 21.70 | \n",
" 4.30 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 10.85 | \n",
" David Collier | \n",
" 5529694315416009 | \n",
" Sat3697 | \n",
"
\n",
" \n",
" 29 | \n",
" 19.65 | \n",
" 3.00 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 9.82 | \n",
" Melinda Murphy | \n",
" 5489272944576051 | \n",
" Sat2467 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 206 | \n",
" 26.59 | \n",
" 3.41 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 8.86 | \n",
" Daniel Owens | \n",
" 38971087967574 | \n",
" Sat1 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 208 | \n",
" 24.27 | \n",
" 2.03 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 12.14 | \n",
" Jason Carter | \n",
" 4268942915626180 | \n",
" Sat6048 | \n",
"
\n",
" \n",
" 209 | \n",
" 12.76 | \n",
" 2.23 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.38 | \n",
" Sarah Cunningham | \n",
" 341876516331163 | \n",
" Sat1274 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 211 | \n",
" 25.89 | \n",
" 5.16 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.47 | \n",
" Christopher Li | \n",
" 6011962464150569 | \n",
" Sat6735 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 213 | \n",
" 13.27 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.64 | \n",
" Robin Andersen | \n",
" 580140531089 | \n",
" Sat1374 | \n",
"
\n",
" \n",
" 214 | \n",
" 28.17 | \n",
" 6.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 9.39 | \n",
" Marissa Jackson | \n",
" 4922302538691962 | \n",
" Sat3374 | \n",
"
\n",
" \n",
" 215 | \n",
" 12.90 | \n",
" 1.10 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.45 | \n",
" Jessica Owen | \n",
" 4726904879471 | \n",
" Sat6983 | \n",
"
\n",
" \n",
" 216 | \n",
" 28.15 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 5 | \n",
" 5.63 | \n",
" Shawn Barnett PhD | \n",
" 4590982568244 | \n",
" Sat7320 | \n",
"
\n",
" \n",
" 217 | \n",
" 11.59 | \n",
" 1.50 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" Gary Orr | \n",
" 30324521283406 | \n",
" Sat8489 | \n",
"
\n",
" \n",
" 218 | \n",
" 7.74 | \n",
" 1.44 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 3.87 | \n",
" Nicholas Archer | \n",
" 340517153733524 | \n",
" Sat4772 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 227 | \n",
" 20.45 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 5.11 | \n",
" Robert Bradley | \n",
" 213141668145910 | \n",
" Sat4319 | \n",
"
\n",
" \n",
" 228 | \n",
" 13.28 | \n",
" 2.72 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.64 | \n",
" Glenn Jones | \n",
" 502061651712 | \n",
" Sat2937 | \n",
"
\n",
" \n",
" 229 | \n",
" 22.12 | \n",
" 2.88 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 11.06 | \n",
" Jennifer Russell | \n",
" 4793003293608 | \n",
" Sat3943 | \n",
"
\n",
" \n",
" 230 | \n",
" 24.01 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.00 | \n",
" Michael Osborne | \n",
" 4258682154026 | \n",
" Sat7872 | \n",
"
\n",
" \n",
" 231 | \n",
" 15.69 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 5.23 | \n",
" Jason Parks | \n",
" 4812333796161 | \n",
" Sat6334 | \n",
"
\n",
" \n",
" 232 | \n",
" 11.61 | \n",
" 3.39 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" James Taylor | \n",
" 6011482917327995 | \n",
" Sat2124 | \n",
"
\n",
" \n",
" 233 | \n",
" 10.77 | \n",
" 1.47 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.38 | \n",
" Paul Novak | \n",
" 6011698897610858 | \n",
" Sat1467 | \n",
"
\n",
" \n",
" 234 | \n",
" 15.53 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 7.76 | \n",
" Tracy Douglas | \n",
" 4097938155941930 | \n",
" Sat7220 | \n",
"
\n",
" \n",
" 235 | \n",
" 10.07 | \n",
" 1.25 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.04 | \n",
" Sean Gonzalez | \n",
" 3534021246117605 | \n",
" Sat4615 | \n",
"
\n",
" \n",
" 236 | \n",
" 12.60 | \n",
" 1.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.30 | \n",
" Matthew Myers | \n",
" 3543676378973965 | \n",
" Sat5032 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
" 239 | \n",
" 29.03 | \n",
" 5.92 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 9.68 | \n",
" Michael Avila | \n",
" 5296068606052842 | \n",
" Sat2657 | \n",
"
\n",
" \n",
" 240 | \n",
" 27.18 | \n",
" 2.00 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 13.59 | \n",
" Monica Sanders | \n",
" 3506806155565404 | \n",
" Sat1766 | \n",
"
\n",
" \n",
" 241 | \n",
" 22.67 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 11.34 | \n",
" Keith Wong | \n",
" 6011891618747196 | \n",
" Sat3880 | \n",
"
\n",
" \n",
" 242 | \n",
" 17.82 | \n",
" 1.75 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.91 | \n",
" Dennis Dixon | \n",
" 4375220550950 | \n",
" Sat17 | \n",
"
\n",
" \n",
"
\n",
"
163 rows × 11 columns
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"0 16.99 1.01 Female No Sun Dinner 2 8.49 \n",
"1 10.34 1.66 Male No Sun Dinner 3 3.45 \n",
"2 21.01 3.50 Male No Sun Dinner 3 7.00 \n",
"3 23.68 3.31 Male No Sun Dinner 2 11.84 \n",
"4 24.59 3.61 Female No Sun Dinner 4 6.15 \n",
"5 25.29 4.71 Male No Sun Dinner 4 6.32 \n",
"6 8.77 2.00 Male No Sun Dinner 2 4.38 \n",
"7 26.88 3.12 Male No Sun Dinner 4 6.72 \n",
"8 15.04 1.96 Male No Sun Dinner 2 7.52 \n",
"9 14.78 3.23 Male No Sun Dinner 2 7.39 \n",
"10 10.27 1.71 Male No Sun Dinner 2 5.14 \n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"12 15.42 1.57 Male No Sun Dinner 2 7.71 \n",
"13 18.43 3.00 Male No Sun Dinner 4 4.61 \n",
"14 14.83 3.02 Female No Sun Dinner 2 7.42 \n",
"15 21.58 3.92 Male No Sun Dinner 2 10.79 \n",
"16 10.33 1.67 Female No Sun Dinner 3 3.44 \n",
"17 16.29 3.71 Male No Sun Dinner 3 5.43 \n",
"18 16.97 3.50 Female No Sun Dinner 3 5.66 \n",
"19 20.65 3.35 Male No Sat Dinner 3 6.88 \n",
"20 17.92 4.08 Male No Sat Dinner 2 8.96 \n",
"21 20.29 2.75 Female No Sat Dinner 2 10.14 \n",
"22 15.77 2.23 Female No Sat Dinner 2 7.88 \n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"24 19.82 3.18 Male No Sat Dinner 2 9.91 \n",
"25 17.81 2.34 Male No Sat Dinner 4 4.45 \n",
"26 13.37 2.00 Male No Sat Dinner 2 6.68 \n",
"27 12.69 2.00 Male No Sat Dinner 2 6.34 \n",
"28 21.70 4.30 Male No Sat Dinner 2 10.85 \n",
"29 19.65 3.00 Female No Sat Dinner 2 9.82 \n",
".. ... ... ... ... ... ... ... ... \n",
"206 26.59 3.41 Male Yes Sat Dinner 3 8.86 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"208 24.27 2.03 Male Yes Sat Dinner 2 12.14 \n",
"209 12.76 2.23 Female Yes Sat Dinner 2 6.38 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"211 25.89 5.16 Male Yes Sat Dinner 4 6.47 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"213 13.27 2.50 Female Yes Sat Dinner 2 6.64 \n",
"214 28.17 6.50 Female Yes Sat Dinner 3 9.39 \n",
"215 12.90 1.10 Female Yes Sat Dinner 2 6.45 \n",
"216 28.15 3.00 Male Yes Sat Dinner 5 5.63 \n",
"217 11.59 1.50 Male Yes Sat Dinner 2 5.80 \n",
"218 7.74 1.44 Male Yes Sat Dinner 2 3.87 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"227 20.45 3.00 Male No Sat Dinner 4 5.11 \n",
"228 13.28 2.72 Male No Sat Dinner 2 6.64 \n",
"229 22.12 2.88 Female Yes Sat Dinner 2 11.06 \n",
"230 24.01 2.00 Male Yes Sat Dinner 4 6.00 \n",
"231 15.69 3.00 Male Yes Sat Dinner 3 5.23 \n",
"232 11.61 3.39 Male No Sat Dinner 2 5.80 \n",
"233 10.77 1.47 Male No Sat Dinner 2 5.38 \n",
"234 15.53 3.00 Male Yes Sat Dinner 2 7.76 \n",
"235 10.07 1.25 Male No Sat Dinner 2 5.04 \n",
"236 12.60 1.00 Male Yes Sat Dinner 2 6.30 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"239 29.03 5.92 Male No Sat Dinner 3 9.68 \n",
"240 27.18 2.00 Female Yes Sat Dinner 2 13.59 \n",
"241 22.67 2.00 Male Yes Sat Dinner 2 11.34 \n",
"242 17.82 1.75 Male No Sat Dinner 2 8.91 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"0 Christy Cunningham 3560325168603410 Sun2959 \n",
"1 Douglas Tucker 4478071379779230 Sun4608 \n",
"2 Travis Walters 6011812112971322 Sun4458 \n",
"3 Nathaniel Harris 4676137647685994 Sun5260 \n",
"4 Tonya Carter 4832732618637221 Sun2251 \n",
"5 Erik Smith 213140353657882 Sun9679 \n",
"6 Kristopher Johnson 2223727524230344 Sun5985 \n",
"7 Robert Buck 3514785077705092 Sun8157 \n",
"8 Joseph Mcdonald 3522866365840377 Sun6820 \n",
"9 Jerome Abbott 3532124519049786 Sun3775 \n",
"10 William Riley 566287581219 Sun2546 \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"12 Chad Harrington 577040572932 Sun1300 \n",
"13 Joshua Jones 6011163105616890 Sun2971 \n",
"14 Vanessa Jones 30016702287574 Sun3848 \n",
"15 Matthew Reilly 180073029785069 Sun1878 \n",
"16 Elizabeth Foster 4240025044626033 Sun9715 \n",
"17 John Pittman 6521340257218708 Sun2998 \n",
"18 Laura Martinez 30422275171379 Sun2789 \n",
"19 Timothy Oneal 6568069240986485 Sat9213 \n",
"20 Thomas Rice 4403296224639756 Sat1709 \n",
"21 Natalie Gardner 5448125351489749 Sat9618 \n",
"22 Ashley Shelton 3524119516293213 Sat9786 \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"24 Christopher Ross 36739148167928 Sat6236 \n",
"25 Robert Perkins 30502930499388 Sat907 \n",
"26 Kyle Avery 6531339539615499 Sat6651 \n",
"27 Patrick Barber 30155551880343 Sat394 \n",
"28 David Collier 5529694315416009 Sat3697 \n",
"29 Melinda Murphy 5489272944576051 Sat2467 \n",
".. ... ... ... \n",
"206 Daniel Owens 38971087967574 Sat1 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"208 Jason Carter 4268942915626180 Sat6048 \n",
"209 Sarah Cunningham 341876516331163 Sat1274 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"211 Christopher Li 6011962464150569 Sat6735 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"213 Robin Andersen 580140531089 Sat1374 \n",
"214 Marissa Jackson 4922302538691962 Sat3374 \n",
"215 Jessica Owen 4726904879471 Sat6983 \n",
"216 Shawn Barnett PhD 4590982568244 Sat7320 \n",
"217 Gary Orr 30324521283406 Sat8489 \n",
"218 Nicholas Archer 340517153733524 Sat4772 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"227 Robert Bradley 213141668145910 Sat4319 \n",
"228 Glenn Jones 502061651712 Sat2937 \n",
"229 Jennifer Russell 4793003293608 Sat3943 \n",
"230 Michael Osborne 4258682154026 Sat7872 \n",
"231 Jason Parks 4812333796161 Sat6334 \n",
"232 James Taylor 6011482917327995 Sat2124 \n",
"233 Paul Novak 6011698897610858 Sat1467 \n",
"234 Tracy Douglas 4097938155941930 Sat7220 \n",
"235 Sean Gonzalez 3534021246117605 Sat4615 \n",
"236 Matthew Myers 3543676378973965 Sat5032 \n",
"237 Thomas Brown 4284722681265508 Sat2929 \n",
"238 Kimberly Crane 676184013727 Sat9777 \n",
"239 Michael Avila 5296068606052842 Sat2657 \n",
"240 Monica Sanders 3506806155565404 Sat1766 \n",
"241 Keith Wong 6011891618747196 Sat3880 \n",
"242 Dennis Dixon 4375220550950 Sat17 \n",
"\n",
"[163 rows x 11 columns]"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# The Weekend\n",
"df[(df['day'] =='Sun') | (df['day']=='Sat')]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conditional Operator isin()\n",
"\n",
"We can use .isin() operator to filter by a list of options."
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 True\n",
"1 True\n",
"2 True\n",
"3 True\n",
"4 True\n",
"5 True\n",
"6 True\n",
"7 True\n",
"8 True\n",
"9 True\n",
"10 True\n",
"11 True\n",
"12 True\n",
"13 True\n",
"14 True\n",
"15 True\n",
"16 True\n",
"17 True\n",
"18 True\n",
"19 True\n",
"20 True\n",
"21 True\n",
"22 True\n",
"23 True\n",
"24 True\n",
"25 True\n",
"26 True\n",
"27 True\n",
"28 True\n",
"29 True\n",
" ... \n",
"214 True\n",
"215 True\n",
"216 True\n",
"217 True\n",
"218 True\n",
"219 True\n",
"220 False\n",
"221 False\n",
"222 False\n",
"223 False\n",
"224 False\n",
"225 False\n",
"226 False\n",
"227 True\n",
"228 True\n",
"229 True\n",
"230 True\n",
"231 True\n",
"232 True\n",
"233 True\n",
"234 True\n",
"235 True\n",
"236 True\n",
"237 True\n",
"238 True\n",
"239 True\n",
"240 True\n",
"241 True\n",
"242 True\n",
"243 False\n",
"Name: day, Length: 244, dtype: bool"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"options = ['Sat','Sun']\n",
"df['day'].isin(options)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" total_bill | \n",
" tip | \n",
" sex | \n",
" smoker | \n",
" day | \n",
" time | \n",
" size | \n",
" price_per_person | \n",
" Payer Name | \n",
" CC Number | \n",
" Payment ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 16.99 | \n",
" 1.01 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 8.49 | \n",
" Christy Cunningham | \n",
" 3560325168603410 | \n",
" Sun2959 | \n",
"
\n",
" \n",
" 1 | \n",
" 10.34 | \n",
" 1.66 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.45 | \n",
" Douglas Tucker | \n",
" 4478071379779230 | \n",
" Sun4608 | \n",
"
\n",
" \n",
" 2 | \n",
" 21.01 | \n",
" 3.50 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 7.00 | \n",
" Travis Walters | \n",
" 6011812112971322 | \n",
" Sun4458 | \n",
"
\n",
" \n",
" 3 | \n",
" 23.68 | \n",
" 3.31 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 11.84 | \n",
" Nathaniel Harris | \n",
" 4676137647685994 | \n",
" Sun5260 | \n",
"
\n",
" \n",
" 4 | \n",
" 24.59 | \n",
" 3.61 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.15 | \n",
" Tonya Carter | \n",
" 4832732618637221 | \n",
" Sun2251 | \n",
"
\n",
" \n",
" 5 | \n",
" 25.29 | \n",
" 4.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.32 | \n",
" Erik Smith | \n",
" 213140353657882 | \n",
" Sun9679 | \n",
"
\n",
" \n",
" 6 | \n",
" 8.77 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 4.38 | \n",
" Kristopher Johnson | \n",
" 2223727524230344 | \n",
" Sun5985 | \n",
"
\n",
" \n",
" 7 | \n",
" 26.88 | \n",
" 3.12 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 6.72 | \n",
" Robert Buck | \n",
" 3514785077705092 | \n",
" Sun8157 | \n",
"
\n",
" \n",
" 8 | \n",
" 15.04 | \n",
" 1.96 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.52 | \n",
" Joseph Mcdonald | \n",
" 3522866365840377 | \n",
" Sun6820 | \n",
"
\n",
" \n",
" 9 | \n",
" 14.78 | \n",
" 3.23 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.39 | \n",
" Jerome Abbott | \n",
" 3532124519049786 | \n",
" Sun3775 | \n",
"
\n",
" \n",
" 10 | \n",
" 10.27 | \n",
" 1.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 5.14 | \n",
" William Riley | \n",
" 566287581219 | \n",
" Sun2546 | \n",
"
\n",
" \n",
" 11 | \n",
" 35.26 | \n",
" 5.00 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 8.82 | \n",
" Diane Macias | \n",
" 4577817359320969 | \n",
" Sun6686 | \n",
"
\n",
" \n",
" 12 | \n",
" 15.42 | \n",
" 1.57 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.71 | \n",
" Chad Harrington | \n",
" 577040572932 | \n",
" Sun1300 | \n",
"
\n",
" \n",
" 13 | \n",
" 18.43 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 4 | \n",
" 4.61 | \n",
" Joshua Jones | \n",
" 6011163105616890 | \n",
" Sun2971 | \n",
"
\n",
" \n",
" 14 | \n",
" 14.83 | \n",
" 3.02 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 7.42 | \n",
" Vanessa Jones | \n",
" 30016702287574 | \n",
" Sun3848 | \n",
"
\n",
" \n",
" 15 | \n",
" 21.58 | \n",
" 3.92 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 2 | \n",
" 10.79 | \n",
" Matthew Reilly | \n",
" 180073029785069 | \n",
" Sun1878 | \n",
"
\n",
" \n",
" 16 | \n",
" 10.33 | \n",
" 1.67 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 3.44 | \n",
" Elizabeth Foster | \n",
" 4240025044626033 | \n",
" Sun9715 | \n",
"
\n",
" \n",
" 17 | \n",
" 16.29 | \n",
" 3.71 | \n",
" Male | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 5.43 | \n",
" John Pittman | \n",
" 6521340257218708 | \n",
" Sun2998 | \n",
"
\n",
" \n",
" 18 | \n",
" 16.97 | \n",
" 3.50 | \n",
" Female | \n",
" No | \n",
" Sun | \n",
" Dinner | \n",
" 3 | \n",
" 5.66 | \n",
" Laura Martinez | \n",
" 30422275171379 | \n",
" Sun2789 | \n",
"
\n",
" \n",
" 19 | \n",
" 20.65 | \n",
" 3.35 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 6.88 | \n",
" Timothy Oneal | \n",
" 6568069240986485 | \n",
" Sat9213 | \n",
"
\n",
" \n",
" 20 | \n",
" 17.92 | \n",
" 4.08 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.96 | \n",
" Thomas Rice | \n",
" 4403296224639756 | \n",
" Sat1709 | \n",
"
\n",
" \n",
" 21 | \n",
" 20.29 | \n",
" 2.75 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 10.14 | \n",
" Natalie Gardner | \n",
" 5448125351489749 | \n",
" Sat9618 | \n",
"
\n",
" \n",
" 22 | \n",
" 15.77 | \n",
" 2.23 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 7.88 | \n",
" Ashley Shelton | \n",
" 3524119516293213 | \n",
" Sat9786 | \n",
"
\n",
" \n",
" 23 | \n",
" 39.42 | \n",
" 7.58 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.86 | \n",
" Lance Peterson | \n",
" 3542584061609808 | \n",
" Sat239 | \n",
"
\n",
" \n",
" 24 | \n",
" 19.82 | \n",
" 3.18 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 9.91 | \n",
" Christopher Ross | \n",
" 36739148167928 | \n",
" Sat6236 | \n",
"
\n",
" \n",
" 25 | \n",
" 17.81 | \n",
" 2.34 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 4.45 | \n",
" Robert Perkins | \n",
" 30502930499388 | \n",
" Sat907 | \n",
"
\n",
" \n",
" 26 | \n",
" 13.37 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.68 | \n",
" Kyle Avery | \n",
" 6531339539615499 | \n",
" Sat6651 | \n",
"
\n",
" \n",
" 27 | \n",
" 12.69 | \n",
" 2.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.34 | \n",
" Patrick Barber | \n",
" 30155551880343 | \n",
" Sat394 | \n",
"
\n",
" \n",
" 28 | \n",
" 21.70 | \n",
" 4.30 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 10.85 | \n",
" David Collier | \n",
" 5529694315416009 | \n",
" Sat3697 | \n",
"
\n",
" \n",
" 29 | \n",
" 19.65 | \n",
" 3.00 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 9.82 | \n",
" Melinda Murphy | \n",
" 5489272944576051 | \n",
" Sat2467 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 206 | \n",
" 26.59 | \n",
" 3.41 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 8.86 | \n",
" Daniel Owens | \n",
" 38971087967574 | \n",
" Sat1 | \n",
"
\n",
" \n",
" 207 | \n",
" 38.73 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 9.68 | \n",
" Ricky Ramirez | \n",
" 347817964484033 | \n",
" Sat4505 | \n",
"
\n",
" \n",
" 208 | \n",
" 24.27 | \n",
" 2.03 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 12.14 | \n",
" Jason Carter | \n",
" 4268942915626180 | \n",
" Sat6048 | \n",
"
\n",
" \n",
" 209 | \n",
" 12.76 | \n",
" 2.23 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.38 | \n",
" Sarah Cunningham | \n",
" 341876516331163 | \n",
" Sat1274 | \n",
"
\n",
" \n",
" 210 | \n",
" 30.06 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 10.02 | \n",
" Shawn Mendoza | \n",
" 30184049218122 | \n",
" Sat8361 | \n",
"
\n",
" \n",
" 211 | \n",
" 25.89 | \n",
" 5.16 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.47 | \n",
" Christopher Li | \n",
" 6011962464150569 | \n",
" Sat6735 | \n",
"
\n",
" \n",
" 212 | \n",
" 48.33 | \n",
" 9.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 12.08 | \n",
" Alex Williamson | \n",
" 676218815212 | \n",
" Sat4590 | \n",
"
\n",
" \n",
" 213 | \n",
" 13.27 | \n",
" 2.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.64 | \n",
" Robin Andersen | \n",
" 580140531089 | \n",
" Sat1374 | \n",
"
\n",
" \n",
" 214 | \n",
" 28.17 | \n",
" 6.50 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 9.39 | \n",
" Marissa Jackson | \n",
" 4922302538691962 | \n",
" Sat3374 | \n",
"
\n",
" \n",
" 215 | \n",
" 12.90 | \n",
" 1.10 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.45 | \n",
" Jessica Owen | \n",
" 4726904879471 | \n",
" Sat6983 | \n",
"
\n",
" \n",
" 216 | \n",
" 28.15 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 5 | \n",
" 5.63 | \n",
" Shawn Barnett PhD | \n",
" 4590982568244 | \n",
" Sat7320 | \n",
"
\n",
" \n",
" 217 | \n",
" 11.59 | \n",
" 1.50 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" Gary Orr | \n",
" 30324521283406 | \n",
" Sat8489 | \n",
"
\n",
" \n",
" 218 | \n",
" 7.74 | \n",
" 1.44 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 3.87 | \n",
" Nicholas Archer | \n",
" 340517153733524 | \n",
" Sat4772 | \n",
"
\n",
" \n",
" 219 | \n",
" 30.14 | \n",
" 3.09 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 7.54 | \n",
" Shelby House | \n",
" 502097403252 | \n",
" Sat8863 | \n",
"
\n",
" \n",
" 227 | \n",
" 20.45 | \n",
" 3.00 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 5.11 | \n",
" Robert Bradley | \n",
" 213141668145910 | \n",
" Sat4319 | \n",
"
\n",
" \n",
" 228 | \n",
" 13.28 | \n",
" 2.72 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.64 | \n",
" Glenn Jones | \n",
" 502061651712 | \n",
" Sat2937 | \n",
"
\n",
" \n",
" 229 | \n",
" 22.12 | \n",
" 2.88 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 11.06 | \n",
" Jennifer Russell | \n",
" 4793003293608 | \n",
" Sat3943 | \n",
"
\n",
" \n",
" 230 | \n",
" 24.01 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 4 | \n",
" 6.00 | \n",
" Michael Osborne | \n",
" 4258682154026 | \n",
" Sat7872 | \n",
"
\n",
" \n",
" 231 | \n",
" 15.69 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 5.23 | \n",
" Jason Parks | \n",
" 4812333796161 | \n",
" Sat6334 | \n",
"
\n",
" \n",
" 232 | \n",
" 11.61 | \n",
" 3.39 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.80 | \n",
" James Taylor | \n",
" 6011482917327995 | \n",
" Sat2124 | \n",
"
\n",
" \n",
" 233 | \n",
" 10.77 | \n",
" 1.47 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.38 | \n",
" Paul Novak | \n",
" 6011698897610858 | \n",
" Sat1467 | \n",
"
\n",
" \n",
" 234 | \n",
" 15.53 | \n",
" 3.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 7.76 | \n",
" Tracy Douglas | \n",
" 4097938155941930 | \n",
" Sat7220 | \n",
"
\n",
" \n",
" 235 | \n",
" 10.07 | \n",
" 1.25 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 5.04 | \n",
" Sean Gonzalez | \n",
" 3534021246117605 | \n",
" Sat4615 | \n",
"
\n",
" \n",
" 236 | \n",
" 12.60 | \n",
" 1.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 6.30 | \n",
" Matthew Myers | \n",
" 3543676378973965 | \n",
" Sat5032 | \n",
"
\n",
" \n",
" 237 | \n",
" 32.83 | \n",
" 1.17 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 16.42 | \n",
" Thomas Brown | \n",
" 4284722681265508 | \n",
" Sat2929 | \n",
"
\n",
" \n",
" 238 | \n",
" 35.83 | \n",
" 4.67 | \n",
" Female | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 11.94 | \n",
" Kimberly Crane | \n",
" 676184013727 | \n",
" Sat9777 | \n",
"
\n",
" \n",
" 239 | \n",
" 29.03 | \n",
" 5.92 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 3 | \n",
" 9.68 | \n",
" Michael Avila | \n",
" 5296068606052842 | \n",
" Sat2657 | \n",
"
\n",
" \n",
" 240 | \n",
" 27.18 | \n",
" 2.00 | \n",
" Female | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 13.59 | \n",
" Monica Sanders | \n",
" 3506806155565404 | \n",
" Sat1766 | \n",
"
\n",
" \n",
" 241 | \n",
" 22.67 | \n",
" 2.00 | \n",
" Male | \n",
" Yes | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 11.34 | \n",
" Keith Wong | \n",
" 6011891618747196 | \n",
" Sat3880 | \n",
"
\n",
" \n",
" 242 | \n",
" 17.82 | \n",
" 1.75 | \n",
" Male | \n",
" No | \n",
" Sat | \n",
" Dinner | \n",
" 2 | \n",
" 8.91 | \n",
" Dennis Dixon | \n",
" 4375220550950 | \n",
" Sat17 | \n",
"
\n",
" \n",
"
\n",
"
163 rows × 11 columns
\n",
"
"
],
"text/plain": [
" total_bill tip sex smoker day time size price_per_person \\\n",
"0 16.99 1.01 Female No Sun Dinner 2 8.49 \n",
"1 10.34 1.66 Male No Sun Dinner 3 3.45 \n",
"2 21.01 3.50 Male No Sun Dinner 3 7.00 \n",
"3 23.68 3.31 Male No Sun Dinner 2 11.84 \n",
"4 24.59 3.61 Female No Sun Dinner 4 6.15 \n",
"5 25.29 4.71 Male No Sun Dinner 4 6.32 \n",
"6 8.77 2.00 Male No Sun Dinner 2 4.38 \n",
"7 26.88 3.12 Male No Sun Dinner 4 6.72 \n",
"8 15.04 1.96 Male No Sun Dinner 2 7.52 \n",
"9 14.78 3.23 Male No Sun Dinner 2 7.39 \n",
"10 10.27 1.71 Male No Sun Dinner 2 5.14 \n",
"11 35.26 5.00 Female No Sun Dinner 4 8.82 \n",
"12 15.42 1.57 Male No Sun Dinner 2 7.71 \n",
"13 18.43 3.00 Male No Sun Dinner 4 4.61 \n",
"14 14.83 3.02 Female No Sun Dinner 2 7.42 \n",
"15 21.58 3.92 Male No Sun Dinner 2 10.79 \n",
"16 10.33 1.67 Female No Sun Dinner 3 3.44 \n",
"17 16.29 3.71 Male No Sun Dinner 3 5.43 \n",
"18 16.97 3.50 Female No Sun Dinner 3 5.66 \n",
"19 20.65 3.35 Male No Sat Dinner 3 6.88 \n",
"20 17.92 4.08 Male No Sat Dinner 2 8.96 \n",
"21 20.29 2.75 Female No Sat Dinner 2 10.14 \n",
"22 15.77 2.23 Female No Sat Dinner 2 7.88 \n",
"23 39.42 7.58 Male No Sat Dinner 4 9.86 \n",
"24 19.82 3.18 Male No Sat Dinner 2 9.91 \n",
"25 17.81 2.34 Male No Sat Dinner 4 4.45 \n",
"26 13.37 2.00 Male No Sat Dinner 2 6.68 \n",
"27 12.69 2.00 Male No Sat Dinner 2 6.34 \n",
"28 21.70 4.30 Male No Sat Dinner 2 10.85 \n",
"29 19.65 3.00 Female No Sat Dinner 2 9.82 \n",
".. ... ... ... ... ... ... ... ... \n",
"206 26.59 3.41 Male Yes Sat Dinner 3 8.86 \n",
"207 38.73 3.00 Male Yes Sat Dinner 4 9.68 \n",
"208 24.27 2.03 Male Yes Sat Dinner 2 12.14 \n",
"209 12.76 2.23 Female Yes Sat Dinner 2 6.38 \n",
"210 30.06 2.00 Male Yes Sat Dinner 3 10.02 \n",
"211 25.89 5.16 Male Yes Sat Dinner 4 6.47 \n",
"212 48.33 9.00 Male No Sat Dinner 4 12.08 \n",
"213 13.27 2.50 Female Yes Sat Dinner 2 6.64 \n",
"214 28.17 6.50 Female Yes Sat Dinner 3 9.39 \n",
"215 12.90 1.10 Female Yes Sat Dinner 2 6.45 \n",
"216 28.15 3.00 Male Yes Sat Dinner 5 5.63 \n",
"217 11.59 1.50 Male Yes Sat Dinner 2 5.80 \n",
"218 7.74 1.44 Male Yes Sat Dinner 2 3.87 \n",
"219 30.14 3.09 Female Yes Sat Dinner 4 7.54 \n",
"227 20.45 3.00 Male No Sat Dinner 4 5.11 \n",
"228 13.28 2.72 Male No Sat Dinner 2 6.64 \n",
"229 22.12 2.88 Female Yes Sat Dinner 2 11.06 \n",
"230 24.01 2.00 Male Yes Sat Dinner 4 6.00 \n",
"231 15.69 3.00 Male Yes Sat Dinner 3 5.23 \n",
"232 11.61 3.39 Male No Sat Dinner 2 5.80 \n",
"233 10.77 1.47 Male No Sat Dinner 2 5.38 \n",
"234 15.53 3.00 Male Yes Sat Dinner 2 7.76 \n",
"235 10.07 1.25 Male No Sat Dinner 2 5.04 \n",
"236 12.60 1.00 Male Yes Sat Dinner 2 6.30 \n",
"237 32.83 1.17 Male Yes Sat Dinner 2 16.42 \n",
"238 35.83 4.67 Female No Sat Dinner 3 11.94 \n",
"239 29.03 5.92 Male No Sat Dinner 3 9.68 \n",
"240 27.18 2.00 Female Yes Sat Dinner 2 13.59 \n",
"241 22.67 2.00 Male Yes Sat Dinner 2 11.34 \n",
"242 17.82 1.75 Male No Sat Dinner 2 8.91 \n",
"\n",
" Payer Name CC Number Payment ID \n",
"0 Christy Cunningham 3560325168603410 Sun2959 \n",
"1 Douglas Tucker 4478071379779230 Sun4608 \n",
"2 Travis Walters 6011812112971322 Sun4458 \n",
"3 Nathaniel Harris 4676137647685994 Sun5260 \n",
"4 Tonya Carter 4832732618637221 Sun2251 \n",
"5 Erik Smith 213140353657882 Sun9679 \n",
"6 Kristopher Johnson 2223727524230344 Sun5985 \n",
"7 Robert Buck 3514785077705092 Sun8157 \n",
"8 Joseph Mcdonald 3522866365840377 Sun6820 \n",
"9 Jerome Abbott 3532124519049786 Sun3775 \n",
"10 William Riley 566287581219 Sun2546 \n",
"11 Diane Macias 4577817359320969 Sun6686 \n",
"12 Chad Harrington 577040572932 Sun1300 \n",
"13 Joshua Jones 6011163105616890 Sun2971 \n",
"14 Vanessa Jones 30016702287574 Sun3848 \n",
"15 Matthew Reilly 180073029785069 Sun1878 \n",
"16 Elizabeth Foster 4240025044626033 Sun9715 \n",
"17 John Pittman 6521340257218708 Sun2998 \n",
"18 Laura Martinez 30422275171379 Sun2789 \n",
"19 Timothy Oneal 6568069240986485 Sat9213 \n",
"20 Thomas Rice 4403296224639756 Sat1709 \n",
"21 Natalie Gardner 5448125351489749 Sat9618 \n",
"22 Ashley Shelton 3524119516293213 Sat9786 \n",
"23 Lance Peterson 3542584061609808 Sat239 \n",
"24 Christopher Ross 36739148167928 Sat6236 \n",
"25 Robert Perkins 30502930499388 Sat907 \n",
"26 Kyle Avery 6531339539615499 Sat6651 \n",
"27 Patrick Barber 30155551880343 Sat394 \n",
"28 David Collier 5529694315416009 Sat3697 \n",
"29 Melinda Murphy 5489272944576051 Sat2467 \n",
".. ... ... ... \n",
"206 Daniel Owens 38971087967574 Sat1 \n",
"207 Ricky Ramirez 347817964484033 Sat4505 \n",
"208 Jason Carter 4268942915626180 Sat6048 \n",
"209 Sarah Cunningham 341876516331163 Sat1274 \n",
"210 Shawn Mendoza 30184049218122 Sat8361 \n",
"211 Christopher Li 6011962464150569 Sat6735 \n",
"212 Alex Williamson 676218815212 Sat4590 \n",
"213 Robin Andersen 580140531089 Sat1374 \n",
"214 Marissa Jackson 4922302538691962 Sat3374 \n",
"215 Jessica Owen 4726904879471 Sat6983 \n",
"216 Shawn Barnett PhD 4590982568244 Sat7320 \n",
"217 Gary Orr 30324521283406 Sat8489 \n",
"218 Nicholas Archer 340517153733524 Sat4772 \n",
"219 Shelby House 502097403252 Sat8863 \n",
"227 Robert Bradley 213141668145910 Sat4319 \n",
"228 Glenn Jones 502061651712 Sat2937 \n",
"229 Jennifer Russell 4793003293608 Sat3943 \n",
"230 Michael Osborne 4258682154026 Sat7872 \n",
"231 Jason Parks 4812333796161 Sat6334 \n",
"232 James Taylor 6011482917327995 Sat2124 \n",
"233 Paul Novak 6011698897610858 Sat1467 \n",
"234 Tracy Douglas 4097938155941930 Sat7220 \n",
"235 Sean Gonzalez 3534021246117605 Sat4615 \n",
"236 Matthew Myers 3543676378973965 Sat5032 \n",
"237 Thomas Brown 4284722681265508 Sat2929 \n",
"238 Kimberly Crane 676184013727 Sat9777 \n",
"239 Michael Avila 5296068606052842 Sat2657 \n",
"240 Monica Sanders 3506806155565404 Sat1766 \n",
"241 Keith Wong 6011891618747196 Sat3880 \n",
"242 Dennis Dixon 4375220550950 Sat17 \n",
"\n",
"[163 rows x 11 columns]"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[df['day'].isin(['Sat','Sun'])]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}