Analyze NYC Taxi Data with Python
Load, clean, and visualize 6,433 NYC taxi trips to uncover tipping patterns.
Introduction
30 Second Summary
Every time you hail a taxi, your ride generates a data point. Multiply that by thousands of trips a day across New York City, and you have a goldmine of patterns hiding in plain sight.
In this project, you will load real NYC taxi trip data into Python, clean up messy records, and uncover business insights about tipping and fares through analysis and visualizations.
What You'll Build
You will run a single Python script that prints trip summaries to your terminal and saves professional charts you can open and share with anyone.
By the end of this project, you'll have:
- A terminal summary showing average tips, fare breakdowns, and borough rankings from 6,433 real taxi trips.
- Saved chart images (bar charts and histograms) that reveal which payment methods generate the highest tips and how tip amounts are distributed.
- A repeatable load-clean-analyze-visualize workflow you can apply to any tabular dataset you encounter in the future.
- Secret Mission: Add a time-of-day analysis to discover when the most generous tippers ride.
Are there any prerequisites?
You need Python and VS Code installed on your computer before starting. Step 1 will guide you through installing the data analysis libraries.
Before We Start
Before we dive in, let's lock in what you're about to build and why it matters.
Set Up Your Environment
Python on its own has no built-in tools for analyzing data or creating charts. To work with real datasets, you need specialized libraries that give Python superpowers for data analysis.
In this step, you'll install three libraries (pandas, matplotlib, and seaborn), then create a project folder with your first Python script.
In this step, get ready to:
- Install pandas, matplotlib, and seaborn.
- Create a taxi-analysis project folder with an analysis.py file.
- Confirm everything is wired up by running the script.
Install the data analysis libraries
- In VS Code, open the integrated terminal by pressing Ctrl+` (macOS) or Ctrl+` (Windows).
- Install all three libraries at once by running this command:
pip install pandas matplotlib seaborn
What does this command do?
pip is Python's package manager. It downloads and installs libraries from the internet.
- pandas lets you load, filter, and analyze tabular data (like spreadsheets).
- matplotlib creates charts and graphs from your data.
- seaborn adds beautiful statistical visualizations on top of matplotlib. It also includes built-in practice datasets.
You should see output scrolling as pip downloads and installs each library. It finishes with a Successfully installed message listing all the packages.
Seeing 'command not found' or a permissions error?
- Try pip3 instead of pip. Some systems use pip3 to refer to the Python 3 version.
- On macOS/Linux, if you see a permissions error, try adding --user at the end of the command.
Help me fix my pip install error.
Create your project folder
Every data project lives in its own folder. This keeps your script and output files organized in one place.
- Move to your Desktop by running this command:
cd ~/Desktop
- Create your project folder and move into it by running these commands:
mkdir taxi-analysis
cd taxi-analysis
- Now open this folder in VS Code. Click File in the top menu bar.
- Click Open Folder.
- Navigate to your Desktop, select the taxi-analysis folder, and click Open.
VS Code might ask if you trust this folder
If a dialog appears asking about workspace trust, click Trust. This allows VS Code to run your Python scripts from this folder.
VS Code now shows taxi-analysis in the Explorer sidebar on the left. The folder is empty for now.
Write and run your first script
With the libraries installed and your folder ready, it's time to create the Python script that will hold your entire analysis.
- Open the terminal in this new workspace by pressing Ctrl+` (macOS) or Ctrl+` (Windows).
- Create your analysis file by running this command:
touch analysis.py
- Confirm the file was created by running:
ls
You should see analysis.py listed in the output. It also appears in the Explorer sidebar.
On Windows and touch doesn't work?
Windows doesn't have the touch command by default. Instead, in the Explorer sidebar, hover over the folder name and click the New File icon. Type analysis.py and press Enter.
Help me create a file in VS Code.
- Click on analysis.py in the Explorer sidebar to open it in the editor.
- Add the following code to the file:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
print("All libraries ready!")
What does this code do?
- import pandas as pd loads the pandas library and gives it the shortcut name pd. This is a universal convention in data analysis.
- import seaborn as sns loads seaborn (shortened to sns). You'll use it to load the taxi dataset and style charts.
- import matplotlib.pyplot as plt loads the plotting module from matplotlib. The plt shortcut is standard across the Python ecosystem.
- The print() line verifies that all three imports succeeded without errors.
- Save the file by pressing Cmd+S (macOS) or Ctrl+S (Windows).
Before you run this script, what do you expect to see printed in the terminal?
- Run the script by entering this command in your terminal:
python analysis.py
You should see this output:
All libraries ready!
That single line confirms all three libraries imported without errors. Your environment is fully set up.
Seeing ModuleNotFoundError?
- This means the library wasn't installed for the Python version your terminal is using. Try running pip3 install pandas matplotlib seaborn and then re-run the script.
- If you have multiple Python versions, try python3 analysis.py instead.
Help me fix my ModuleNotFoundError.
✔️ Awesome, I've got everything!
Great. Double check you've saved analysis.py and you're ready for the next step.
ⓧ I'd like to double check the full code
Here's the complete analysis.py file so far:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
print("All libraries ready!")
Your environment is ready. Next up, you'll load thousands of real NYC taxi trip records and get your first look at the data.
Load and Explore the Data
Your libraries are installed and ready to go. Before you can discover insights in any dataset, you need to load it and understand its structure.
In this step, you will load a real dataset of 6,433 NYC taxi trips and get your first look at what the data contains. You will check column types, summary statistics, and whether any data is missing.
In this step, get ready to:
- Load the NYC taxis dataset into a DataFrame.
- Explore column types and summary statistics.
- Check for missing values across all columns.
Load the taxis dataset
Seaborn ships with built-in practice datasets so you can start analyzing without downloading files from the internet. The "taxis" dataset contains real NYC yellow and green cab trips from March 2019.
- In analysis.py, find the line that says print("All libraries ready!").
- Replace that entire line with this code to load the taxi dataset and print its first rows:
# Load the dataset
df = sns.load_dataset("taxis")
print("=== NYC Taxi Trip Analysis ===\n")
print(df.head())
print(f"\nDataset shape: {df.shape}")
What does this code do?
- sns.load_dataset("taxis") downloads the taxis CSV from seaborn's data repository and loads it into a pandas DataFrame.
- df.head() prints the first 5 rows so you can see what columns exist.
- df.shape returns a tuple showing how many rows and columns the dataset has.
What is a DataFrame?
A DataFrame is a table of data with labeled rows and columns. Think of it like a spreadsheet in Python. Every column can hold a different data type (numbers, text, dates), and you can filter, sort, and group the data using simple method calls.
- Save analysis.py.
- Run the script by running this command in your terminal:
python analysis.py
You should see a table with columns like pickup, dropoff, passengers, distance, and more. The shape should show (6433, 14), meaning 6,433 trips across 14 columns.
Not seeing any output?
- Make sure you deleted the old print("All libraries ready!") line completely before adding the new code.
- Check that you saved analysis.py before running it.
- If you see ModuleNotFoundError, confirm you installed seaborn in the previous step.
- help me debug why my script isn't printing the taxi data
Explore column types and check for missing values
Knowing column types tells you what operations you can perform on each field. Checking for missing values reveals data quality issues before they corrupt your analysis.
- In analysis.py, add this code below the print(f"\nDataset shape: {df.shape}") line:
print(df.info())
print(df.describe())
# Check for missing values
print("\nMissing values per column:")
print(df.isnull().sum())
What does this code do?
- .info() prints each column's name, data type, and how many non-null values it has.
- .describe() calculates count, mean, standard deviation, min, max, and quartiles for every numeric column.
- .isnull().sum() counts how many missing (NaN) values exist in each column.
- Save analysis.py.
Before you run the script, predict: do you think every column will have complete data, or will some columns have missing values?
- Run the script again:
python analysis.py
Scroll through the output. You should see column type information, descriptive statistics, and a missing values count at the bottom. Notice that several columns (like payment and pickup_borough) have missing values.
Why do missing values matter?
Missing data can silently skew your results. If you calculate an average but some rows are excluded because they have blank values, your number might not represent the full picture. Spotting these gaps now means you can decide how to handle them before running any analysis.
Seeing a really long wall of text?
That is expected. The output from .info() and .describe() is verbose for 14 columns. Scroll up in your terminal to see the full output including the first 5 rows at the top.
help me understand the output of my taxi data exploration
✔️ Awesome, I've got everything!
Great. Double check you have saved analysis.py and move on to the next step.
ⓧ I'd like to double check the full code
Here is the complete analysis.py at this point:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Load the dataset
df = sns.load_dataset("taxis")
print("=== NYC Taxi Trip Analysis ===\n")
print(df.head())
print(f"\nDataset shape: {df.shape}")
print(df.info())
print(df.describe())
# Check for missing values
print("\nMissing values per column:")
print(df.isnull().sum())
You have a clear picture of your data now. You know its shape, its column types, and where the gaps are. Next up, you will attempt your first real analysis and discover why those missing values are a problem.
Attempt Your First Analysis
In the previous step, you explored the taxis dataset and spotted that some columns have missing values. Now it's time to answer a real business question: which payment method generates higher tips?
You will run your first groupby aggregation to calculate average tips by payment type. The result looks fine on the surface, but hidden data gaps will silently distort your numbers.
In this step, get ready to:
- Calculate average tip grouped by payment method using groupby.
- Discover how missing data silently distorts your analysis results.
Calculate average tip by payment method
The question is simple: do credit card riders tip more than cash riders? A groupby groups your rows by a column's values, then applies an aggregation (like .mean()) to each group.
- In analysis.py, find the line that says print(df.isnull().sum()) at the bottom of your file.
- Add the following code below it to group tips by payment method:
# Attempt analysis - see the problem with missing data
print("\n--- First Attempt: Average Tip by Payment Method ---")
print(df.groupby("payment")["tip"].mean())
What does this code do?
df.groupby("payment") splits your 6,433 rows into groups based on the value in the payment column.
["tip"].mean() then calculates the average tip within each group. The result shows one average-tip value per payment method.
Before you run this, think about what you expect to see. You know from the previous step that some rows have missing values in the payment column. Do you think those rows will appear in the output, or will they vanish?
- Save analysis.py and run it by entering this command in your terminal:
python analysis.py
Scroll to the bottom of the output. You see two payment methods (credit card and cash) with their average tips. The output looks clean and trustworthy.
But here is the problem: those rows with missing payment values? They were silently excluded from the calculation. Groupby drops NaN values by default, so your averages are computed on an incomplete dataset without any warning.
Not seeing any output at all?
Check that you saved analysis.py before running the command. Also confirm you are running the command from inside your taxi-analysis folder.
Help me debug my analysis.py script
Measure the missing data impact
Knowing that data is missing is one thing. Knowing how much is missing tells you whether it matters.
- Add the following code to the bottom of analysis.py to count and display the excluded rows:
missing_payment = df["payment"].isnull().sum()
print(f"\nRows with missing payment: {missing_payment}")
print(f"That's {missing_payment / len(df) * 100:.1f}% of data being excluded!")
What does this code do?
df["payment"].isnull().sum() counts every row where the payment column is empty (NaN). The f-string then divides that count by the total number of rows to show the percentage of your dataset that groupby silently ignored.
- Save analysis.py and run the script again:
python analysis.py
At the bottom of your output, you now see exactly how many rows had no payment value and what percentage of your data was silently excluded from the analysis. That is a significant chunk of data vanishing without a trace.
Why does this matter?
If those missing rows all belong to one type of rider (high tippers or low tippers), your average is skewed. You cannot know whether your analysis is accurate until you deal with the gaps. In the next step, you will clean this data so every aggregation is trustworthy.
Seeing a KeyError or NameError?
Make sure the column name is exactly "payment" (lowercase, no spaces). Also confirm the variable missing_payment is spelled the same way in both the assignment and the print statements.
Help me fix my groupby code
✔️ Awesome, I've got everything!
Great. Double check you have saved analysis.py with both the groupby and the missing-data count.
ⓧ I'd like to double check the full code
Here is what your complete analysis.py should look like at this point:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Load the dataset
df = sns.load_dataset("taxis")
print("=== NYC Taxi Trip Analysis ===\n")
print(df.head())
print(f"\nDataset shape: {df.shape}")
print(df.info())
print(df.describe())
# Check for missing values
print("\nMissing values per column:")
print(df.isnull().sum())
# Attempt analysis - see the problem with missing data
print("\n--- First Attempt: Average Tip by Payment Method ---")
print(df.groupby("payment")["tip"].mean())
missing_payment = df["payment"].isnull().sum()
print(f"\nRows with missing payment: {missing_payment}")
print(f"That's {missing_payment / len(df) * 100:.1f}% of data being excluded!")
You have just hit the most common trap in data analysis: trusting output from incomplete data. Next up, you will clean the dataset and re-run your analysis on data you can actually trust.
Clean the Data and Analyze
In the last step, you saw the problem firsthand. Missing values in the payment column silently exclude rows from your analysis, making your aggregations untrustworthy.
The fix is straightforward. Drop the incomplete rows so every remaining row has a valid payment value, then re-run the groupby on clean data.
In this step, get ready to:
- Drop rows with missing payment data to create a clean DataFrame.
- Calculate average, median, and count of tips grouped by payment method.
- Analyze average fare by pickup borough to find the most expensive areas.
Drop missing data and analyze tips by payment method
The dropna() method removes rows where a specified column contains missing values. Once the data is clean, you can trust the groupby results.
- In analysis.py, add the following code at the bottom of your file to clean the data and run a detailed tip analysis:
# Clean the data
df_clean = df.dropna(subset=["payment"])
print(f"\nCleaned dataset: {len(df_clean)} rows (dropped {len(df) - len(df_clean)} rows with missing payment)")
# Analyze tip by payment method
tip_by_payment = df_clean.groupby("payment")["tip"].agg(["mean", "median", "count"])
print("\nAverage Tip by Payment Method:")
print(tip_by_payment)
What does this code do?
This code does two things in sequence.
- df.dropna(subset=["payment"]) creates a new DataFrame called df_clean that only keeps rows where the payment column has a value.
- .agg(["mean", "median", "count"]) applies three aggregation functions at once, giving you a richer picture than just the mean.
Before you run this, what do you think the tip comparison between credit card and cash will show? Will they be similar, or will one payment method have noticeably higher tips?
- Save analysis.py and run the script by entering this command in your terminal:
python analysis.py
Scroll to the bottom of the output. You should see the cleaned dataset size, then a table with mean, median, and count columns showing credit card tips averaging significantly higher than cash tips.
Why are credit card tips so much higher?
Cash tips are often underreported because there is no digital record. Credit card tips are recorded automatically at the exact amount entered on the payment terminal. This is a classic example of measurement bias in real-world data.
Seeing a KeyError or empty table?
- Make sure the column name in dropna(subset=["payment"]) is lowercase payment with quotes around it.
- Check that you are calling .groupby("payment") on df_clean (the cleaned DataFrame), not on the original df.
Help me debug my groupby analysis
Analyze fares by pickup borough
Payment method is only one dimension. The pickup_borough column lets you ask a geographic question: where do the most expensive rides start?
- Add this code at the bottom of analysis.py to calculate average fare by borough, sorted from most to least expensive:
# Analyze by borough
borough_stats = df_clean.groupby("pickup_borough")["total"].agg(["mean", "count"])
borough_stats = borough_stats.sort_values("mean", ascending=False)
print("\nAverage Fare by Pickup Borough:")
print(borough_stats)
What does this code do?
- .groupby("pickup_borough")["total"] groups all trips by where they started, then looks at the total fare column.
- .sort_values("mean", ascending=False) puts the most expensive borough at the top of the table.
- Save analysis.py and run the script again:
python analysis.py
At the very bottom of the output, you should see a table of boroughs ranked by average fare, with Manhattan or a borough with fewer but longer trips at the top.
Seeing unexpected borough names or NaN rows?
- The pickup_borough column also has some missing values. These appear as a separate row in the output. This is expected for now.
- Make sure you are grouping by pickup_borough (not pickup_zone). The borough column gives you a higher-level geographic view.
Help me fix my borough analysis
✔️ Awesome, I've got everything!
Great. Double check you have saved analysis.py and your terminal output shows all three sections: the cleaned dataset size, the tip-by-payment table, and the borough stats table.
ⓧ I'd like to double check the full code
Your analysis.py should contain these sections in order. Scroll up through your file and confirm each block is present:
- Imports (pandas, seaborn, matplotlib).
- Load dataset and print exploration output (head, shape, info, describe).
- Check for missing values with isnull().sum().
- First attempt groupby on payment and the missing payment count print.
- Clean with dropna(subset=["payment"]) and print the cleaned size.
- Groupby payment on df_clean with agg(["mean", "median", "count"]).
- Groupby pickup_borough on total with sort by mean descending.
You now have clean data and two solid analyses. Numbers in a terminal are great for exploration, but they are not what you present to stakeholders. Next up, you will turn these findings into professional charts.
Create Visualizations
Your analysis has uncovered clear patterns in the taxi data. Credit card tips are higher than cash tips, and you can see fare differences across boroughs.
Numbers printed to a terminal are useful for you, but they are not convincing to stakeholders. In this step, you will turn your findings into professional charts that make patterns instantly visible.
In this step, get ready to:
- Create a bar chart comparing average tips by payment method.
- Create a histogram showing the distribution of tip amounts.
- Print a summary of key findings to your terminal.
Create a bar chart of tips by payment method
A bar chart is the best way to compare a small number of categories side-by-side. You already have the tip_by_payment DataFrame from the previous step, so you can plot its mean column directly.
- In analysis.py, add the following code at the bottom of your file to create and save a bar chart:
# Visualization 1: Bar chart of tips by payment
fig, ax = plt.subplots(figsize=(8, 5))
tip_by_payment["mean"].plot(kind="bar", ax=ax, color=["#2196F3", "#4CAF50"])
ax.set_title("Average Tip by Payment Method")
ax.set_ylabel("Average Tip ($)")
ax.set_xlabel("Payment Method")
plt.xticks(rotation=0)
plt.tight_layout()
plt.savefig("tip_by_payment.png")
print("\nSaved tip_by_payment.png")
plt.clf()
What does this code do?
- plt.subplots(figsize=(8, 5)) creates a new figure that is 8 inches wide and 5 inches tall.
- tip_by_payment["mean"].plot(kind="bar") draws a bar for each payment method using the average tip values you calculated earlier.
- plt.savefig("tip_by_payment.png") saves the chart as a PNG image file in your project folder.
- plt.clf() clears the current figure so the next chart starts fresh without leftover elements from this one.
- Save analysis.py.
- Run your script to generate the chart:
python analysis.py
- Near the end of the output, you should see Saved tip_by_payment.png printed.
- Confirm the file exists by running:
ls tip_by_payment.png
You should see tip_by_payment.png listed in the output.
Don't see the PNG file?
- Make sure you saved analysis.py before running it.
- Check that your terminal is inside the taxi-analysis folder. Run pwd to confirm.
- If you see an error about tip_by_payment not being defined, make sure all the code from previous steps is still in your file above this new code.
Need more help? Why isn't my bar chart saving?
Create a histogram of tip distribution
A histogram shows how values are spread across a range. This reveals whether most tips cluster around a specific amount or are spread evenly.
- Add the following code below the bar chart code in analysis.py:
# Visualization 2: Histogram of tip distribution
fig, ax = plt.subplots(figsize=(8, 5))
df_clean[df_clean["tip"] > 0]["tip"].plot(kind="hist", bins=30, ax=ax, color="#FF9800", edgecolor="white")
ax.set_title("Distribution of Tip Amounts (Non-Zero Tips)")
ax.set_xlabel("Tip Amount ($)")
ax.set_ylabel("Number of Trips")
plt.tight_layout()
plt.savefig("tip_distribution.png")
print("Saved tip_distribution.png")
What does this code do?
- df_clean[df_clean["tip"] > 0]["tip"] filters out zero-tip rows so the histogram only shows trips where a tip was actually given.
- bins=30 splits the tip range into 30 equal-width buckets. Each bar shows how many trips fall within that bucket.
- edgecolor="white" adds white borders between bars so they are visually distinct.
- Save analysis.py and run it again:
python analysis.py
- You should now see Saved tip_distribution.png printed near the end of the output.
- Confirm both chart files exist by running:
ls *.png
You should see both tip_by_payment.png and tip_distribution.png listed.
Only seeing one PNG file?
- Make sure the histogram code is below the plt.clf() line from the bar chart. If you placed it above, both charts render on the same figure.
- Check for any indentation errors in the new code block.
Still stuck? Help me figure out why my second chart isn't saving.
Print a summary of key findings
A good analysis ends with a clear summary. This final section calculates the exact tip difference between credit card and cash payments, giving you a single headline number.
- Add the following code at the bottom of analysis.py:
# Key findings
print("\n--- KEY FINDINGS ---")
print(f"Total trips analyzed: {len(df_clean)}")
credit_avg = df_clean[df_clean["payment"] == "credit card"]["tip"].mean()
cash_avg = df_clean[df_clean["payment"] == "cash"]["tip"].mean()
print(f"Credit card average tip: ${credit_avg:.2f}")
print(f"Cash average tip: ${cash_avg:.2f}")
print(f"Credit card tips are {credit_avg / max(cash_avg, 0.01):.0f}x higher than cash tips")
What does this code do?
- credit_avg filters for only credit card rows and calculates their mean tip.
- cash_avg does the same for cash payments.
- max(cash_avg, 0.01) prevents a division-by-zero error in case cash tips average exactly zero.
- The :.2f format shows dollar amounts to two decimal places. The :.0f format shows the ratio as a whole number.
- Save analysis.py.
Before you run the script, what do you think the ratio between credit card and cash tips will be? Take a guess.
- Run your script one final time:
python analysis.py
At the end of the output, you should see the KEY FINDINGS section with a total trip count, both averages, and the multiplier between them.
- Open tip_by_payment.png and tip_distribution.png from your taxi-analysis folder to see your charts.
The bar chart should show two bars (credit card and cash) with a clear height difference. The histogram should show most tips clustering at smaller amounts with a long tail of generous tippers.
Charts look blank or distorted?
- If tip_by_payment.png is blank, make sure your plt.savefig() line comes before plt.clf(). Clearing the figure before saving gives you an empty image.
- If the bars overlap or look wrong, check that plt.clf() is between the two chart sections.
Need help? My charts look wrong or blank. Help me fix them.
✔️ Awesome, I've got everything!
Great. Double check you have saved analysis.py and both PNG files exist in your taxi-analysis folder.
ⓧ I'd like to double check the full code
Your analysis.py file is now over 30 lines, so here is a checklist of all the sections it should contain in order:
- Imports (pandas, seaborn, matplotlib.pyplot).
- Load the dataset and print exploration output (head, shape, info, describe).
- Check for missing values with isnull().sum().
- First attempt at groupby on payment and the missing payment count.
- Clean the data with dropna.
- Tip by payment aggregation (tip_by_payment) and borough stats (borough_stats).
- Visualization 1: Bar chart saved as tip_by_payment.png, followed by plt.clf().
- Visualization 2: Histogram saved as tip_distribution.png.
- Key findings section printing credit_avg, cash_avg, and the ratio.
Scroll up through your code and confirm each section is present in this order.
You now have a complete analysis pipeline that loads, cleans, analyzes, and visualizes real data. Next up, you will take on the Secret Mission and add a time-of-day dimension to your analysis.
Secret mission
Add a Time-of-Day Analysis
Your analysis so far answers what (which payment methods tip more) and where (which boroughs are priciest). But it doesn't answer when. Discovering when the most generous tippers ride adds a temporal dimension to your analysis and teaches you datetime parsing, a skill used in nearly every real-world dataset.
Clean Up Your Resources
Clean Up Your Resources
Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
This project runs entirely locally, so there are no ongoing costs.
Resources you used:
- The taxi-analysis folder on your Desktop containing analysis.py and three chart images.
- Cached seaborn dataset in ~/seaborn-data/.
- Installed Python packages: pandas, matplotlib, and seaborn.
Keep everything running
No action needed. Choose this if you plan to keep building on your analysis or want to upload it to GitHub for your portfolio.
- Your taxi-analysis folder stays on your Desktop with all charts and your script.
- The cached dataset in ~/seaborn-data/ stays available for future seaborn projects.
- The installed packages (pandas, matplotlib, seaborn) remain available for any future Python data projects.
Pause - I'll come back to this later
Since this project is entirely local with no running processes, there is nothing to pause. Your files will be waiting for you whenever you return.
- Your script and charts take up minimal disk space and can sit indefinitely.
- When you come back, open VS Code and navigate to ~/Desktop/taxi-analysis to pick up where you left off.
Delete - I don't want to use this again
Remove all project files and cached data to start fresh.
- Delete the project folder by running this in your terminal:
macOS
rm -rf ~/Desktop/taxi-analysis
rm -rf ~/seaborn-data/
This removes the project folder and the cached seaborn dataset.
Windows
rmdir /s /q %USERPROFILE%\Desktop\taxi-analysis
rmdir /s /q %USERPROFILE%\seaborn-data
This removes the project folder and the cached seaborn dataset.
- Uninstall the Python packages by running:
pip uninstall pandas matplotlib seaborn -y
This removes the three libraries you installed for this project.
Nice Work!
Nice Work!
Nice work! You just built a complete data analysis pipeline that transforms raw NYC taxi trip data into actionable business insights with professional visualizations.
You've learned how to:
- Identified and handled missing data in a real-world dataset of 6,433 NYC taxi trips, ensuring every aggregation is trustworthy.
- Used groupby aggregations to discover that credit card tips are significantly higher than cash tips.
- Created and saved professional bar charts and histograms using matplotlib that communicate patterns at a glance.
- Secret Mission: Parsed datetime data to reveal tipping patterns by hour of day.
Ready to quiz yourself?