Portfolio · Week 2 of 4 · 7 hours
Data Cleaning, SQL Analysis and Python Analysis
Complete the analysis for the two new projects to a portfolio standard.
Learning objectives
By the end of this week you will be able to:
- Clean each dataset and document the cleaning.
- Write readable, commented SQL that answers the project questions.
- Write a clean, well-organized Python notebook.
- Apply code-quality habits that reviewers notice.
Lessons
Data Cleaning
In a portfolio, cleaning is a chance to show care. Reviewers look for evidence that you checked the data, not just loaded it. Include a short cleaning section in each project with a before-and-after table (row counts, missing values, duplicates removed) and a cleaning log. One sentence explaining why you made each decision ("removed 87 rides with negative duration because they are logging errors") shows judgment.
SQL Analysis
For the SQL-focused project, make the queries themselves part of the showcase:
- Start each file with a comment block stating the question.
- Use consistent formatting: keywords in capitals, one clause per line, meaningful aliases.
- Show a range of skills: filtering, GROUP BY with HAVING, joins across at least two tables, and a subquery.
- Paste the key results (a small table or screenshot) into the README so readers do not have to run anything.
Python Analysis
For the Python-focused project, the notebook is what reviewers read. Make it easy:
- Open with a text cell: title, problem, questions, data source.
- Use headings to divide sections, and put a short explanation above each code cell.
- Remove dead code and error output; restart the kernel and run all cells before saving so everything runs in order.
- Label every chart (title, axis labels, units) and add a "So what?" sentence under it.
- Finish with a Findings and Recommendations section.
Move repeated code into functions, and keep cell outputs short (use .head() rather than printing whole tables).
Watch
- VideoData Analyst Portfolio Project: Data Cleaning in SQL (Alex The Analyst)
Cleaning in SQL to a portfolio standard.
- VideoData Analyst Portfolio Project: Exploratory Data Analysis with Pandas
A notebook built for a portfolio.
- VideoAdvanced SQL Tutorial | Subqueries (Alex The Analyst)
Refresher if your SQL project needs a subquery.
Practice
Complete the cleaning and analysis for both new projects. Then do a peer review swap: read a classmate's SQL file and notebook and give three specific suggestions using the checklists above.
Check your understanding
Try each question first, then open it to see the answer.
What should open every portfolio notebook?
A text cell with the title, problem, questions and data source.
Why restart the kernel and run all cells before saving?
To prove the notebook runs top to bottom without errors or hidden state.
What makes a cleaning decision convincing to a reviewer?
A short explanation of why it was made, with the number of rows affected.
Assignment
Submit the cleaned data, SQL files and notebooks for both new projects, plus the peer feedback you gave and received.