import pandas as pd
= pd.read_csv("https://milliams.com/courses/data_analysis_python/tips.csv") tips
= tips[tips["day"] == "Thur"]
thurs thurs
total_bill | tip | day | time | size | |
---|---|---|---|---|---|
77 | 27.20 | 2.80 | Thur | Lunch | 4 |
78 | 22.76 | 2.10 | Thur | Lunch | 2 |
79 | 17.29 | 1.90 | Thur | Lunch | 2 |
80 | 19.44 | 2.10 | Thur | Lunch | 2 |
81 | 16.66 | 2.38 | Thur | Lunch | 2 |
... | ... | ... | ... | ... | ... |
202 | 13.00 | 1.40 | Thur | Lunch | 2 |
203 | 16.40 | 1.75 | Thur | Lunch | 2 |
204 | 20.53 | 2.80 | Thur | Lunch | 4 |
205 | 16.47 | 2.26 | Thur | Lunch | 3 |
243 | 18.78 | 2.10 | Thur | Dinner | 2 |
62 rows × 5 columns
"tip"].mean() thurs[
1.9398387096774192
"day"] == "Sat"]["tip"].mean() tips[tips[
2.095402298850575