Python For & While Loops for Data Science / Data Analysis - P.3
Skills:
Python for Data90%
Python Fundamentals Course (DataCamp) ๐๐ผ https://lukeb.co/PythonBasicsDataCamp
Data Analyst Track w/ Python (DataCamp) ๐๐ผ https://lukeb.co/PythonAnalystDataCamp
(My recommended courses that I took to learn Python!)
This video provides and overview of how loops (for and while) are used by data scientist and data analysts. In this tutorial we take time to cover for and while loops and how they are used with different built in functions such as: range(), enumerate(), & .items(). Additionally, we cover loop control statements: break, continue, pass. Finally, we combine what we learned to analyze the script from the popular TV show "The Office" to find lines that contain: That's what she said.
Playlist (Course) Material ๐๐ผ https://github.com/lukebarousse/Python_Intro
00:00 Intro
00:41 For Loops - The basics
02:08 For Loops - range() function
03:07 For Loops - Iterating over objects
03:53 For Loops - Iterating over a dictionary
06:10 For Loops - enumerate() function
08:01 While Loops - The basics
09:20 While Loops - More complex
10:17 Loop Control Statements - break
11:43 Loop Control Statements - continue
12:29 Loop Control Statements - pass
13:02 Application: Analyzing "The Office" script
14:54 Application: Read the CSV
17:04 Application: Insert Column from CSV in list
19:42 Application: Find "That's what she said"
22:50 Conclusion
Basics of Python playlist ๐๐ผ https://www.youtube.com/playlist?list=PL_CkpxkuPiT8zTx9XO9jFf4PQ0iwBWfXB
Setting up Python on your computer playlist ๐๐ผ https://www.youtube.com/playlist?list=PL_CkpxkuPiT9udgCeqZpS4HKF6uIzra3r
Recommended Certificates/Courses (Affiliate Links)
==================================
DataCamp:
Python ๐๐ผ https://lukeb.co/PythonBasicsDataCamp
Power BI ๐๐ผ https://lukeb.co/PowerBIDataCamp
Tableau ๐๐ผ https://lukeb.co/TableauDataCamp
R ๐๐ผ https://lukeb.co/RDataCamp
Data Analyst w/ Python ๐๐ผ https://lukeb.co/PythonAnalystDataCamp
DataCamp Subscription (Monthly $25USD) ๐๐ผ https://lukeb.co/DataCam
Watch on YouTube โ
(saves to browser)
Sign in to unlock AI tutor explanation ยท โก30
Playlist
Uploads from Luke Barousse ยท Luke Barousse ยท 19 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
โถ
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Connect Google Sheets to Tableau & Joining Data - Tableau Tutorial P.1
Luke Barousse
How To Use Tableau Desktop Controls - Tableau Tutorial P.2
Luke Barousse
Dimensions Vs Measures (Blue Vs Green Data) - Tableau Tutorial P.3
Luke Barousse
Create Stacked Bar Chart (and any other visuals EASILY!) w/ Show Me! - Tableau Tutorial P.4
Luke Barousse
Conditional Format Tables in Tableau (Like Excel!) - Tableau Tutorial P.5
Luke Barousse
Calculated Fields in Tableau (Formulas & IF Statements) - Tableau Tutorial P.6
Luke Barousse
Parameters (Create & Use in Calculated Fields and/or Visuals) - Tableau Tutorial P.7
Luke Barousse
Totals, Average Lines, & Trend Lines (Analytics Pane) - Tableau Tutorial P.8
Luke Barousse
How To Create a Dashboard - Tableau Tutorial P.9
Luke Barousse
Upload your dashboard to Tableau Public - Tableau Tutorial P.10
Luke Barousse
Install Python for Data Science on Mac & Windows (PC) with Anaconda - P.1
Luke Barousse
How to run Python for Data Science - Editors vs IDEs - P.2
Luke Barousse
Install VS Code with Python for Data Science / Data Analysis - P.3
Luke Barousse
Understanding Virtual Environments for Data Science / Data Analysis - P.4
Luke Barousse
Using VS Code with Python for Data Science / Data Analysis - P.5
Luke Barousse
Python for Data Science / Analysis ft. 'The Office' Dataset - P.0
Luke Barousse
Python Objects frequently used in Data Science / Data Analysis - P.1
Luke Barousse
Python If Statements for Data Science / Data Analysis - P.2
Luke Barousse
Python For & While Loops for Data Science / Data Analysis - P.3
Luke Barousse
Python List Comprehension for Data Science / Data Analysis - P.4
Luke Barousse
Python Functions for Data Science / Data Analysis - P.5
Luke Barousse
Lambda Functions for Data Science / Data Analysis - Python P.6
Luke Barousse
How NOT to learn Python for Data Science
Luke Barousse
What is Business Intelligence (BI)? ๐๐
Luke Barousse
Top 3๏ธโฃ Technical Skills for Business Intelligence ๐๐
Luke Barousse
Top Non-technical Skills for Business Intelligence ๐๐จ๐ผโ๐ป
Luke Barousse
M1 vs Intel Mac for Data Science
Luke Barousse
M1 vs Intel Mac for Excel ๐๐จ๐ผโ๐ป
Luke Barousse
M1 vs Intel Mac for Python ๐๐จ๐ผโ๐ป
Luke Barousse
M1 vs Intel Mac for Business Intelligence Tools ๐ป๐
Luke Barousse
M1 Macbook Air vs Pro (8 vs 16 GB) for Data Science
Luke Barousse
Python for M1 Mac vs Intel (SPOILER: M1 is 2x faster)
Luke Barousse
Data Analyst's WFH Setup & Upgrades
Luke Barousse
Windows on the M1 Mac - What are your options?
Luke Barousse
Install your favorite Windows app on M1 Mac - ft. Parallels
Luke Barousse
Data Science shortcuts for Mac
Luke Barousse
Day in the life of a data analyst
Luke Barousse
Power BI vs Tableau - Best BI Tool
Luke Barousse
Mac Vs PC - BEST for Data Science
Luke Barousse
Data Scientist vs Data Analyst (funny!)
Luke Barousse
Become a DATA ANALYST with NO degree?!? The Google Data Analytics Professional Certificate
Luke Barousse
Certificates vs Degree for Data Analysts (ft. Google Data Analytics Professional Certificate)
Luke Barousse
Google vs IBM Data Analyst Certificate - BEST Certificate for Data Analysts
Luke Barousse
Python Vs R (funny!)
Luke Barousse
THIS got me my job as a Data Analyst - My portfolio tip
Luke Barousse
I used Python to Count my Bike Jumps!
Luke Barousse
Standout as a Data Analyst with THIS TOOL
Luke Barousse
STOP using Spreadsheets for Everything!
Luke Barousse
Transition into Data Science - My Tips & Story
Luke Barousse
Get a JOB w/ Google Data Analytics Certificate?!? (ft. Certificate Holders)
Luke Barousse
Staying Motivated in Data Science
Luke Barousse
Data Science - Expectation vs Reality (funny!) - ft. @KenJee_ds
Luke Barousse
Get NOTICED in Data Science!!! (3 types of GREAT projects)
Luke Barousse
Use THIS to showcase EXPERIENCE in Data Science
Luke Barousse
How to show EXPERIENCE... when you have NONE?!?
Luke Barousse
Learn PYTHON to be a DATA ANALYST?!? (or is R enough...)
Luke Barousse
The BIGGEST MISTAKE when starting a data project!
Luke Barousse
Top Jobs in Data Science
Luke Barousse
How to get Data Analytics side jobs - NEW LinkedIn Feature
Luke Barousse
Building a bot to scrape job dataโฆ How NOT to collect data
Luke Barousse
More on: Python for Data
View skill โRelated AI Lessons
โก
โก
โก
โก
How AI & Sports Analytics Are Transforming Every Sport in 2026
Medium ยท Data Science
A Guide To Building Your First Web Scraper with Python
Medium ยท Python
Future of Data Analytics: Whatโs Next After AI (2026 and Beyond)
Medium ยท AI
5 Data Patterns That Scream 'Your Developer Is Burning Out
Dev.to ยท ะัััั ะะฐะฝ
Chapters (16)
Intro
0:41
For Loops - The basics
2:08
For Loops - range() function
3:07
For Loops - Iterating over objects
3:53
For Loops - Iterating over a dictionary
6:10
For Loops - enumerate() function
8:01
While Loops - The basics
9:20
While Loops - More complex
10:17
Loop Control Statements - break
11:43
Loop Control Statements - continue
12:29
Loop Control Statements - pass
13:02
Application: Analyzing "The Office" script
14:54
Application: Read the CSV
17:04
Application: Insert Column from CSV in list
19:42
Application: Find "That's what she said"
22:50
Conclusion
๐
Tutor Explanation
DeepCamp AI