Keith Galli
How to Program Connect 4 in Python! (part 1) - Basic Structure & Game Loop
updated
brdta.com/keithgalli
In this video, we're diving into advanced web scraping techniques with Python. If you haven't seen my overview of the Beautiful Soup library, check it out first for some foundational knowledge. Web scraping is a highly valuable skill, especially for freelance work. This tutorial will take you through sophisticated scraping methods, using Walmart as an example.
Before we start, a big thank you to our sponsor, Bright Data. They offer proxy tools that make advanced web scraping much easier, allowing you to bypass restrictions set by websites. Check out their data sets marketplace for quick access to various data.
In this video, we'll cover:
- Setting up and understanding the HTML structure of a web page
- Extracting data using Beautiful Soup and handling dynamic content
- Implementing headers to avoid detection
- Parsing JSON data for efficient scraping
- Using proxies with Bright Data to bypass IP blocking
- Error handling and retries in scraping
- Storing scraped data and handling multiple search queries
If you need help getting started with web scraping, check out my original tutorial on BeautifulSoup:
youtu.be/GjKQ6V_ViQE?si=f9Xo0ING4fNLhLx2
Helpful Links:
GitHub Repository with Code Examples: github.com/KeithGalli/advanced-scraping
Video Timeline!
0:00 - Intro & Overview
1:30 - Identifying HTML Structure for Scraping (from Walmart)
4:26 - Writing Python BeautifulSoup Code to Extract Info from Walmart.com
7:22 - Implementing modified request headers to avoid detection
6:10 - Handling Dynamic Content
8:00 - Implementing Modified Request Headers to Avoid Detection (look more human when scraping)
9:30 - Parsing Complicated JSON Data (Using LLMs to help)
15:28 - Extending our Code to Collect Info on Many Products (Automating Search)
24:45 - Improving our Code (avoiding duplicates, multiple search terms, using a queue, etc.)
27:20 - Setting Up Proxies with Bright Data (Get around IP Address blocks)
36:35 - Error Handling and Retries
39:36 - Automating actions on pages with Selenium
41:42 - Conclusion & Next Steps
I hope you find this tutorial useful. If you did, please give it a thumbs up and subscribe to the channel for more tutorials. Let me know in the comments how you plan to use these web scraping techniques in your projects. Enjoy scraping!
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
We'll be working off of this repo:
github.com/KeithGalli/Olympics-Dataset
Some topics that we cover:
- How you can use web scraping to collect data like this (Python beautifulsoup).
- Splitting strings into separate columns
- Using regular expressions (regexes) to extract specific details from columns
- Converting columns to datetime & numeric types
- Grabbing only a subset of our columns
Sorry that this was a bit last minute scheduling-wise, will try to give more advance notice in the future!
Video timeline!
0:00 - Livestream Overview
4:00 - About the Olympics dataset (source website and how it was scraped)
9:50 - Cleaning the dataset (getting started with code & data)
19:26 - What aspects of our data should be cleaned?
29:08 - Get rid of bullet points in Used name column
34:08 - How to split Measurements into two separate height/weight numeric columns.
1:05:00 - Parse out dates from Born & Died columns
1:25:43 - Parse out city, region, and country from Born column (working with regular expressions)
1:41:15 - Get rid of the extra columns
1:46:08 - Next steps (how would we clean the results.csv)
1:49:41 - Questions & Answers
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Repo we're working off of (credit to Alex Riley who put repo together):
github.com/ajcr/100-pandas-puzzles
My code solutions (use repo above for blank starting template):
github.com/KeithGalli/100-pandas-puzzles
Hope that you enjoy this video. If you do, make sure to like it and subscribe to not miss future videos like this!
Video Timeline!
0:00 - Intro & Setup
2:14 - Problems (1-3) Initial pandas setup
4:42 - Problems (4-10) DataFrame operations
4:52 - 4) Create a dataframe from dictionary
5:24 - 5) Display dataframe summary
5:41 - 6) First 3 rows of the dataframe
6:02 - 7) Select ‘animal’ and ‘age’ columns
7:42 - 8) Data in specific rows and columns
9:06 - 9) Rows with visits greater than 3
9:57 - 10) Rows with NaN in age
10:56 - 11) Cats younger than 3 years
11:35 - 12) Age between 2 and 4
12:45 - 13) Change age in row ‘f’
15:56 - 14) Sum of all visits
16:41 - 15) Average age by animal
20:21 - 16) Modify and revert rows
24:06 - 17) Count by animal type
25:28 - Quick review
26:17 - 18) Sort by age and visits
28:07 - 19) Convert 'priority' to boolean
29:42 - 20) Replace 'snake' with 'python'
30:53 - 21) Mean age by animal and visits
33:49 - Advanced DataFrame techniques
33:57 - 22) Filter duplicate integers
43:18 - 23) Subtract row mean
45:42 - 24) Column with smallest sum
50:39 - 25) Count unique rows
53:17 - 26) Column with third NaN
1:10:27 - Solution review for 26
1:17:13 - 27) Sum of top three values
1:24:01 - 28) Sum by column condition
1:40:11 - Recent problem review
1:42:53 - 29) Count differences since last zero
1:56:19 - 30) Locate largest values
2:08:38 - 31) Replace negatives with mean
2:17:43 - 32) Rolling mean over groups
2:23:10 - Series and DatetimeIndex
2:23:12 - 33) DatetimeIndex for 2015
2:27:56 - 34) Sum values on Wednesdays
2:45:04 - 35) Monthly mean values
2:46:16 - 36) Best value in four-month groups
2:50:26 - 37) DatetimeIndex of third Thursdays
2:59:03 - Cleaning Data
2:59:40 - 38) Fill missing FlightNumber
3:02:45 - 39) Split column by delimiter
3:06:47 - 40) Fix city name capitalization
3:08:30 - 41) Reattach columns
3:13:11 - 42) Fix airline name punctuation
3:17:45 - 43) Expand RecentDelays into columns
3:27:31 - MultiIndexes in Pandas
3:27:34 - 44) Construct a MultiIndex
3:30:37 - Solution review
3:32:44 - 45) Lexicographically sorted check
3:32:58 - 46) Select specific MultiIndex labels
3:34:23 - 47) Slice Series with MultiIndex
3:35:24 - 48) Sum by first level
3:37:47 - 49) Alternative sum method
3:40:08 - Additional solution insights
3:41:22 - 50) Swap MultiIndex levels
3:45:27 - Minesweeper problems
3:45:44 - 51) Generate coordinate grid
4:00:28 - 52) Add 'safe' or 'mine' column
4:03:04 - 53) Count adjacent mines
4:27:33 - Review solution to 53
4:33:02 - Skipped problems 54 & 55
4:33:11 - Plotting
4:33:12 - 56) Scatter plot with black x markers
4:41:26 - 57) Plot four data types
4:52:50 - 58) Overlay multiple graphs
5:03:11 - 59) Hourly stock data summary
5:14:12 - 60) Candlestick plot
------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Video timeline!
0:00 - Intro & Live Stream Overview
4:58 - How over saturated is the data science job market and will things improve in your opinion?
7:26 - How much maths is needed to get a data science job?
9:55 - Can you share a basic roadmap to learn generative AI and LLMs?
13:08 - What future-proof tech career to should someone focus on who’s looking to change career?
16:52 - Is data structures & algorithms (dsa) necessary to get a job in data science?
19:17 - How to get good at data structures and algorithms?
22:20 - Why don’t you make videos regularly now?
24:18 - How much do you need to know for entry-level roles / college internships?
27:02 - How important is domain knowledge for data science?
29:29 - Amazon’s AI-based ‘just walk out’ retail checkout tech controversy thoughts
32:30 - Any good data projects to increase visibility to companies?
36:05 - Do you think we should all learn vector databases?
39:10 - Is webscraping illegal? what can I do and not do?
43:14 - What are you working on at the moment?
45:25 - How can I turn a financial database I’m building into an interesting portfolio project to showcase work?
49:23 - What advice do you have for data scientists who want to get into freelance/consulting?
55:15 - What are important skills for DS beyond ML & AI?
59:42 - Do I need to become a full-stack programmer to have success in this field?
1:02:31 - If you weren’t allowed to do programming or create content, what would you do?
1:03:39 - How did you achieve your advanced height? Asking for a friend.
1:04:23 - Final thoughts. Thanks for coming!
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Kaggle Dataset: kaggle.com/datasets/keithgalli/freedmens-bureau-historical-documents
GitHub Repo: github.com/keithgalli/historical-docs-analysis
Project Website: freedmensbureau.info
Contributors:
Abdessalem Boukil (NLP Research & Analysis): linkedin.com/in/abdessalem-boukil-37923637
Trent Self (Kaggle Dataset Setup): linkedin.com/in/trentonself
If you enjoyed this project video, make sure to throw it a thumbs up & subscribe! Let me know in the comments if you have any questions. It would also be helpful for people to upvote the Kaggle dataset for visibility!
---------------------------
Video timeline!
0:00 - Video Overview & Reference Material
3:05 - Data & Code Setup
5:04 - Task #0: Configure LLM to use with Python (OpenAI API)
20:10 - Task #0 (continued): LLM Configuration with Open-Source Model (LLama 2 via Ollama)
27:39 - Task #1: Use LLM to Parse Simple Sentence Examples
41:22 - Sub-task #1: Convert string to Python Object
44:29 - Task #1 (continued): Use Open-Source LLM to Parse Sentence Examples w/ LangChain
56:24 - Quick note on a benefit of using LangChain (easily switching between models)
58:06 - Task #2 (warmup): Grab Apprenticeship Agreement rows from Dataframe
1:06:22 - Task #2: Connect Pages that Belong to the Same Documents
1:56:36 - Task #3: Parse out values from merged documents
2:12:44 - Task #4 (setup): Analyze Results
2:17:52 - Fixing up our results from task #3 quickly
2:20:41 - Task #4: Find the average age of apprentices in our merged contract documents
2:30:59 - Other analysis, wlho had the most apprentices?
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Check out Bobby's GitHub!
github.com/bobbyg603
Python API video Mentioned:
youtu.be/moi8WPO3Xhs?si=GYQenpZ_ASE8BNqf
Ladder's Study on 7 Second Resume Review:
theladders.com/career-advice/you-only-get-6-seconds-of-fame-make-it-count
0:00 - Introduction
1:50 - Tip 1: Show Private Repository Activity
2:57 - Tip 2: Highlight best work using pins
4:13 - Tip 3: Create a Profile README
11:32 - Tip 4: Fill in all Profile Details
13:45 - Tip 5: Fill in READMEs on highlighted repos
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
analystbuilder.com/?via=keith
Join me as I dive into the Analyst Builder platform created by fellow YouTuber @AlexTheAnalyst! In this video, we tackle a series of Python programming challenges, demonstrating real-time problem-solving and coding skills. We navigate through various tasks, from identifying high-risk heart attack patients using data analysis to manipulating strings and solving complex data queries. Whether you're a seasoned programmer or just starting, this video offers insights into Python programming and practical data analysis techniques.
Highlights
- Overview of Analyst Builder platform and its user-friendly interface.
- Coding session solving Python problems related to data analysis and manipulation.
- Detailed walkthrough of three distinct challenges: heart attack risk assessment, customer data anonymization, and sales data analysis for a bakery contest.
Python & Programming Skills Used:
- Writing efficient Python queries to extract specific data from data frames.
- Utilizing Pandas for data analysis, including conditional filtering, sorting, and grouping.
- Implementing string manipulation techniques for data anonymization.
- Leveraging pivot tables for comparative analysis of sales data.
- Dynamic problem-solving and debugging using Python in a real-world scenario.
If you have any questions, let me know in the comments!
If you enjoyed this video, make sure to throw it a like & subscribe for all future content :)
Video timeline!
0:00 - Overview & Getting Started
0:50 - 1. Predicting Heart Attack Risk (Easy Problem)
6:44 - 2. Data Anonymization (Medium Problem)
11:53 - 3. Dessert Duel (Hard Problem)
Keywords: #Python #Pandas #DataAnalysis #AnalystBuilder #ProblemSolving #Coding #Tutorial #DataScience
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Link to first video:
youtu.be/moi8WPO3Xhs
Source code:
github.com/KeithGalli/python-api-example/tree/part1-code
Final source code:
github.com/KeithGalli/python-api-example/tree/book_review
Gitlog command info can be found in this article:
medium.com/posh-engineering/mastering-the-terminal-to-improve-development-speed-fd234149efb6
How to set environment variables (all operating systems:
twilio.com/blog/how-to-set-environment-variables-html
More information on the Flasgger library:
github.com/flasgger/flasgger
Handling API keys with a Python decorator:
coderwall.com/p/4qickw/require-an-api-key-for-a-route-in-flask-using-only-a-decorator
If you enjoyed this video, be sure to give it a like and subscribe :). If you have any questions, let me know in the comments!
Video timeline!
0:00 - Overview
0:41 - Getting started on the Book Review API
2:20 - Set up Airtable as our database & connect to it with Python
10:44 - Implement code to add reviews and view all reviews
31:40 - Adding a POST request to our API
36:40 - Trying out our new endpoints (using documentation & requests library of Python)
41:32 - Commit code to Github & deploy live to Render.com
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Link to code: github.com/KeithGalli/python-api-example
Part 2: youtu.be/rCrDYRBOuNw?si=bBeT9orOpjr-089S
In this first video, we start with the basics, setting up GET endpoints and learning how to deploy our API to the cloud (using Render.com). This part is crucial for understanding the core functions of APIs and making them accessible worldwide.
In the second video, we progress to implementing POST requests and constructing a full-fledged Book Review API, similar to services like Goodreads. This involves integrating API functionality to post and retrieve book reviews from a database, with practical examples using Airtable for database interaction.
Flasgger plays a crucial role in our tutorial, providing interactive documentation through its SwaggerUI integration. This feature allows you to visualize and interact with your API directly at http://localhost:5000/apidocs, offering a clear and user-friendly overview of your API's capabilities.
Additionally, we cover essential practices like working with GitHub repositories, managing Python libraries, and employing Flask and Flask-Restful for API development. The skills in crafting effective GET and POST requests are emphasized, highlighting the importance of efficient system communication.
This video is ideal for anyone keen on enhancing their Python programming, API development, and cloud deployment skills. Whether you're a beginner or an experienced developer, this tutorial provides valuable experience in developing well-documented and user-friendly APIs.
Video timeline!
0:00 - Video overview
1:18 - What we're building
3:20 - How to get setup with Github template code
7:00 - Taking a look at the Flask, Flasgger Python3 code
8:38 - Testing some API requests (GET) locally
13:09 - Building another GET request endpoint (with multiple parameters)
14:34 - Using ChatGPT to help us build another endpoint
22:43 - Deploying our API to a live public URL endpoint (using render.com)
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
In this video we go through all the fundamentals of using regular expressions (regexes) to match patterns in programming.
In this video we cover the following:
- Character Sets [a-zA-Z0-9]
- Quantifiers *, +, ?, {3,5}
- Metacharacters ^ . | $
- Character Classes \b \s \w \d
- Groups
- Lookahead & Lookbehind assertions
- and more!
There is a detailed timeline down below.
In a future video we will apply what we learn in this one to the Python programming language (re library) -- subscribe to not miss that!
Resources!
Source code & txt files: github.com/keithgalli/regular-expressions
Practice exercise video: youtu.be/Qv_RYpREz5k
Cheat sheet: cheatography.com/davechild/cheat-sheets/regular-expressions
Regex golf: https://alf.nu/RegexGolf
Javascript Info: javascript.info/regexp-lookahead-lookbehind
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video timeline!
0:00 - Video overview & topics covered
1:43 - Basic regex syntax (building up an intuition)
4:23 - Character Sets Overview ([A-Za-z0-9])
5:57 - Quantifiers Guide (*, +, ?, {3,5})
9:30 - Guided Exercise: Find all words that don't use vowels
11:08 - Helpful cheat sheet to remember regex syntax in the real-world
12:47 - Matching words/patterns of a specific length ({3,5})
14:58 - OR operator overview
17:14 - Guided Exercise: Match valid sentences (starts with capital letter, ends with period)
21:18 - Character classes overview (\w, \b, \d, \s)
23:13 - Escaping Characters
25:02 - Practice Exercise #1: Write a regular expression to match meme text format
30:39 - Practice Exercise #2: Write a regular expression to match a specific date format
39:03 - Groups overview
50:16 - Lookahead & Lookbehind Assertions
1:00:18 - Practice Exercise #3: Detect if same word pops up multiple times in a sentence
1:06:04 - Practice Exercise #4: Password matching with rules
1:16:16 - Some final recommendations! (additional practice, chatgpt, etc.)
In this video we walk through a full-length data science interview. The task in the video is to develop a model to identify bots on a social media platform. In the video we cover topics including feature vectorization, one-hot encodings, dataset building, and more!
Check out Kylie's channel: @KylieYYing
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video timeline!
0:00 - Video overview & format
3:38 - Introductory Behavioral questions | Data science interview
9:11 - Social media platform bot issue task overview | Data science interview
16:51 - What are some features we should investigate regarding the bot issue? | Data science interview
26:27 - Classification model implementation details (using feature vectors) | Data science interview
43:03 - What would a dataset to train models to detect bots look like? How would you approach collecting this data? | Data science interview
53:03 - Technical implementation details (python libraries, cloud services, etc) | Data science interview
57:26 - Any questions for me? | Data science interview
1:05:07 - Post-interview breakdown & analysis
Thank you to mobile pixels for sponsoring this video!
In this video we create a Python program that can automatically scrape the RSS feeds of your favorite podcasters, pulling out the episodes you’ll find most interesting, and downloading + transcribing them.
This project leverages a wide range of Python skills making it a good portfolio project. In it you’ll use the BeautifulSoup + requests libraries to first web scrape & download MP3 podcast files. You can use the regex library (re) and other NLP libraries to smart search for specific episodes that you'll enjoy. Next you'll see how you can use AssemblyAI's speech to text API to transcribe all of the episodes that you download. This code will be leveraged to create a text corpora that is going to be used in language analysis in upcoming tutorials.
To view/download source code for project: github.com/keithgalli/podcast-downloader
If you have any questions, let me know in the comments!
Make sure to smash like + subscribe if you enjoyed this video :)
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video timeline!
0:00 - Video Introduction
1:19 - How podcasts work (RSS feeds overview)
5:11 - How can we utilize the XML webpages? (breakdown of RSS feed information & how we’ll use it to create a smart program)
7:47 - Accessing this project on GitHub
9:22 -Writing Python code to download podcasts locally (requests & beautifulsoup libraries)
18:10 - Modify our script to be able to download many podcasts
22:51 - Building in smart search capabilities to grab podcasts we’ll find most interesting!
31:00 - Using the AssemblyAI API to transcribe the podcasts we’ve downloaded
1:06:08 - Cleaning our code with functions & classes and putting everything into Python scripts.
1:18:09 - Portfolio project extension ideas! (Spotify API, NLP semantic search)
1:19:56 - Smash like & subscribe pretty please :)
In this video we solve a series of Data Science Interview questions on Stratascratch. We start with easy problems using Python Pandas and then progressively get more difficult. At the end of the video we do five non-coding interview questions that force you to think at a high level.
Mentioned Resources!
Second Channel: youtube.com/c/techtrekbykeithgalli
Regex Cheat Sheet: cheatography.com/davechild/cheat-sheets/regular-expressions
Probability text book: amazon.com/dp/188652923X/ref=cm_sw_em_r_mt_dp_3JSVKBY80FQ3EEDGSRD6
Here are the questions that we complete (in order)
~~ Coding ~~
1. Finding Updated Records: platform.stratascratch.com/coding/10299-finding-updated-records?code_type=2&via=keith
2. Number of Bathrooms and Bedrooms: platform.stratascratch.com/coding/9622-number-of-bathrooms-and-bedrooms?code_type=2&via=keith
3. Counting Instances in Text: platform.stratascratch.com/coding/9814-counting-instances-in-text?code_type=2&via=keith
4. Customer Revenue in March: platform.stratascratch.com/coding/9782-customer-revenue-in-march?code_type=2&via=keith
5. Monthly Percentage Difference: platform.stratascratch.com/coding/10319-monthly-percentage-difference?code_type=2&via=keith
6. Premium vs Freemium: platform.stratascratch.com/coding/10300-premium-vs-freemium?code_type=2&via=keith
~~ Non-Coding ~~
1. Credit Card Activity: platform.stratascratch.com/technical/2342-credit-card-activity?via=keith
2. Outliers Detection: platform.stratascratch.com/technical/2372-outliers-detection?via=keith
3. Probability of Having a Sister: platform.stratascratch.com/technical/2368-probability-of-having-a-sister?via=keith
4. Uber Black Rides: platform.stratascratch.com/technical/2305-uber-black-rides?via=keith
5. Terabyte of Data: platform.stratascratch.com/technical/2364-terabyte-of-data?via=keith
The skills that we work on in this video include:
- Python Pandas
- Groupby & Aggregate DataFrames
- Use regexes to analyze text
- Datetime objects in Pandas
- Filtering by Conditionals
- Applying a lambda function to a data frame
If you have any questions, let me know in the comments!
If you enjoyed this video, make sure to throw it a like & subscribe for all future content :)
-------------------------
Video Timeline!
0:00 - Intro & Video Overview
0:46 - Check out this Video’s Sponsor, Brilliant!
3:10 - Coding #1 (Microsoft, Easy) - Finding Updated Records
10:36 - Coding #2 (Airbnb, Easy) - Number of Bathrooms and Bedrooms
16:38 - Coding #3 (Google, Medium) - Counting Instances in Text
28:23 - Coding #4 (Meta/Facebook, Medium) - Customer Revenue in March
36:51 - Coding #5 (Amazon, Hard) - Monthly Percentage Difference
56:38 - Coding #6 (Microsoft, Hard) - Premium vs Freemium
01:10:28 - Non-Coding #1 (Visa, Easy) - Credit Card Activity
01:13:33 - Non-Coding #2 (IBM, Easy) - Outliers Detection
01:16:46 - Non-Coding #3 (Google, Medium) - Probability of Having a Sister
01:27:19 - Non-Coding #4 (Uber, Medium) - Uber Black Rides
01:36:57 - Non-Coding #5 (Capital One, Hard) - Terabyte of Data
01:46:41 - Video Conclusion & Recap
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
This video was Sponsored by Brilliant
In this video we walk through some of my favorite tips & tricks for doing data science with Jupyter Notebooks. Many of these tips have helped me become more efficient writing Python code for my data science projects.
Topics covered:
- Running bash commands from a jupyter notebook. You can use “!” in a code cell to run any terminal command that you want. You can also try using the “%” to execute magic lines. This includes some of the same bash commands that you might gravitate to as well as some Jupyter specific commands.
- The most useful shortcuts that I think you should know. Ctrl+enter to run a cell, shift+enter to run a cell and skip to the next, B to create new cells below, M to turn a cell to markdown, and several more. We will also look at find & replace in this section.
- Changing pandas default display settings (number of rows to display, columns, decimal points, etc.)
- Turning on OS alerts for running Jupyter Notebook cells. This is particularly useful if you have a long machine learning model training job going on and you want to know exactly when it finishes so that you can play around with the results.
- Creating slideshows within a Jupyter notebook!
Bonus topic:
- Changing your Jupyter Notebook theme! Monokai is a good one to use if you like dark-themes
Source code:
github.com/KeithGalli/Data-Science-Tips/tree/master/jupyter-notebook-tips
If you have any questions about these tips & tricks, or if you have additional recommendations, please let me know in the comments!
I hope you enjoyed this video! Please subscribe & give it a like if you did.
Resources:
- towardsdatascience.com/8-commonly-used-pandas-display-options-you-should-know-a832365efa95
Learn more about magic commands "%": ipython.readthedocs.io/en/stable/interactive/magics.html
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Song at the end
good morning by Amine Maxwell soundcloud.com/aminemaxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2vpruoY
Music promoted by Audio Library youtu.be/SQWFdnbzlgI
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
This video was sponsored by Brilliant.org
-------------------------
Video timeline!
0:00 - Introduction & video overview
0:25 - Shoutout to this video’s sponsor, Brilliant.org!
2:11 - 1. Running terminal commands such as “pip” directly in a notebook
5:17 - Magic lines in Jupyter
6:11- 2. Shortcuts that you need to know for Jupyter!
9:25 - 3. Changing default Pandas options to improve results display
14:00 - 4. Setting up notifications for when a cell finishes execution
18:08 - 5. Creating slideshows from a IPython notebook!
23:00 - Conclusion (and link to bonus tip!)
stratascratch.com/?via=keith
In this video we work on a real world computer vision problem using Python. The problem task is to create a model that can distinguish a flower known as “La Eterna” from other types of flowers.
To do this we create convolutional neural networks (CNNs) using the Tensorflow/Keras libraries. We examine how to create a simple model and then improve it using techniques such as data augmentation & preprocessing. We play around with different types of network architectures and see how changes improve or decrease overall task performance.
Link to source code (Github):
github.com/KeithGalli/Unlocked_Challenge_4
Link to HP challenge:
hp.com/us-en/workstations/industries/data-science/unlocked-challenge.html
My previous videos on neural networks!
Intro to neural nets: youtu.be/aBIGJeHRZLQ
Real-world tutorial: youtu.be/44U8jJxaNp8
*** I've left a bunch of additional useful resources in the README of the Github repo ***
Videography for clips I integrated at the start by Ryan Cabana
ryancabana.com
Hopefully you enjoy this video! Please leave it a like & subscribe if you did :).
If you have questions about topics covered in this video, please let me know in the comments.
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
Song at the end
good morning by Amine Maxwell soundcloud.com/aminemaxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2vpruoY
Music promoted by Audio Library youtu.be/SQWFdnbzlgI
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video timeline!
0:00 - Intro
0:40 - Video overview (what we’ll be working on)
1:53 - Code setup (GitHub repo & HP challenge link)
5:11 - Exploring the dataset that we’ll be using
6:20 - Reviewing template code (starter-code.ipynb)
8:53 - Installing necessary Python libraries (opencv-python, tensorflow)
10:31 - Reviewing template code (part 2)
11:03 - How we load in the dataset (ImageDataGenerator, flow_from_directory)
14:33 - Building our first classifier (convolutional neural net - CNN)
25:19 - Methods to improve neural network performance (MaxPooling, dropout, network architecture)
29:30 - Quick discussion about importance of precision & recall versus accuracy
32:35 - Data augmentation & preprocessing (another way to improve performance)
47:15 - Programmatically finding the best neural network architectures (Keras Tuner)
1:20:00 - Video recap & conclusion
goto.masterschool.com/8semyn
I'm excited to announce the launch of my data analytics bootcamp in June! This program is 7-months long and is designed to help you land your first role in tech. In the program we will cover tools such as Tableau, SQL, & Python as well as topics such as A/B testing, version control (with Git), and machine learning.
This program is offered through Masterschool. I will lead the program as the head mentor, but there will also be teaching assistants, career counselors, and other staff to help you every step of the way.
About Masterschool:
"Masterschool is where talented individuals build their careers in tech. When you join our network of success-based schools, you learn from the experts exactly what the industry needs, we actively work to help you find a job, and you pay nothing until you are hired."
If you have any questions, let me know in the comments!!
Thank you to Ryan Cabana for the videography!
ryancabana.com
If you enjoyed the video, make sure to leave a like & subscribe :)
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli
-------------------------
Song
Hurricane - Halsey (Artsy Remix)
Start: youtu.be/L7yGsIQtbXE
End: youtu.be/H88a_7bI79E
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video timeline!
0:00 - Intro
0:46 - The announcement!
4:03 - Some final notes & how to apply
GitHub repo: github.com/KeithGalli/pycon2020
Patreon: patreon.com/keithgalli
YT Membership: youtube.com/c/KGMIT/membership
Some of the topics we cover:
- Bag-of-words
- Word vectors
- Stemming/Lemmatization
- Spell correction
- Transformer Architecture (Attention is all you need)
- State of the art models (OpenAI GPT, BERT)
Some of the libraries used:
- sklearn
- spaCy
- NLTK
- TextBlob
Hope you enjoy & let me know if you have any questions! Make sure to subscribe if you haven't already :).
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Song at the end
good morning by Amine Maxwell soundcloud.com/aminemaxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2vpruoY
Music promoted by Audio Library youtu.be/SQWFdnbzlgI
-------------------------
Video Timeline!
~~ NLP Fundamentals ~~
0:00 - Announcements!
1:12 - Video overview & timeline
3:06 - Bag of words (BOW) overview
4:42 - Bag of words example code! (sklearn | CountVectorizer, fit_transform)
11:20 - Building a text classification model using bag-of-words (SVM)
14:07 - Predicting new utterances classes using our model (transform)
16:02 - Unigram, bigram, ngrams (using consecutive words in your model)
19:28 - Word vectors overview
23:27 - Word vectors example code! (Using spaCy library)
28:10 - Building a text classification model using word vectors
34:04 - Predicting new utterances using our model
~~ Miscellaneous NLP Techniques ~~
40:42 - Regexes (pattern matching) in Python.
52:30 - Stemming/Lemmatization in Python (text normalization w/ NLTK library)
1:01:17 - Stopwords Removal (removing most common words from sentences)
1:05:56 - Various other techniques (spell correction, sentiment analysis, part-of-speech tagging).
~~ State-of-the-art Models ~~
1:12:45 - Recurrent Neural Networks (RNNs) for text classification
1:17:00 - Transformer architectures (attention is all you need)
1:21:00 - Writing Python code to leverage transformers (BERT | spacy-transformers)
1:25:00 - Writing a classification model using transformers/BERT
1:29:37 - Fine-tuning transformer models
1:31:16 - Bring it all together and build a high performance model to classify the categories of Amazon reviews!
Check out DataCamp!
bit.ly/KeithGalliDCFeb22
Link to my GitHub:
github.com/KeithGalli/lego-analysis
From the DataCamp website:
The Rebrickable database includes data on every LEGO set that has ever been sold; the names of the sets, what bricks they contain, what color the bricks are, etc. It might be small bricks, but this is big data! In this project, you will get to explore the Rebrickable database and answer a series of questions related to the history of Lego!
Link to Rebrickable database: rebrickable.com/downloads
Some skills worked on in this video:
- Reading CSV files with Python
- Filtering DataFrame based on conditional parameters
- Grouping data by column values and aggregating it
btw, I apologize at about the 25-minute mark I started having microphone issues, I'll have it solved by my next video.
Thank you to DataCamp for sponsoring this video :)
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
Song at the end
good morning by Amine Maxwell soundcloud.com/aminemaxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2vpruoY
Music promoted by Audio Library youtu.be/SQWFdnbzlgI
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Video Timeline!
0:00 - Introduction
1:05 - Getting started w/ Lego analysis project
2:33 - How to follow along if you are not a premium DataCamp subscriber (GitHub)
4:01 - Project tasks overview
5:40 - Basic exploration of the dataset
9:45 - Task #1: What percentage of all licensed sets ever released were Star Wars Themed?
24:23 - Task #2: In which year was Star Wars not the most popular licensed theme?
34:00 - Bonus Task: How many unique sets were released each year (1955-2017)?
42:26 - Conclusion!
keithgalli.com
Consider supporting me on Patreon:
patreon.com/keithgalli
Tutoring scholarship application form:
https://forms.gle/5Br5ojgLTVttvME99
Upgrade your coding environment with WayScript!
wayscript.com/?via=keith
In this video I just wanted to provide some updates for the channel moving forward. Some of the main updates are that I will be adding channel memberships, offering consulting/tutoring, and working with more sponsors.
Content will stay largely the same. A lot of long data science tutorials and project walkthroughs. I will also start posting more short videos on my second channel, TechTrek.
Check out my second channel:
youtube.com/c/TechTrekbyKeithGalli
Let me know if you have any questions about anything discussed in this video.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
----------------------------------------------------------------------
Video timeline!
0:00 - Intro
2:34 - Channel Memberships - Join the Python Army!
6:24 - Other ways to support the channel
6:34 - Paid & Free Tutoring Opportunities
8:21 - Sponsored Videos
9:34 - Content on the Channel moving forward
Raising awareness/money for men's mental health as part of this video! To learn more about the charity, Movember, check out their site: us.movember.com
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
-------------------------
Song at the end
good morning by Amine Maxwell soundcloud.com/aminemaxwell
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: http://bit.ly/2vpruoY
Music promoted by Audio Library youtu.be/SQWFdnbzlgI
Tech specs:
- Intel Core i9 processor
- NVIDIA Quadro RTX 5000 GPU (16 gb)
- 128 GB DDR4 ram (4 x 32 GB)
- 2 TB SSD
- 4K OLED Display (15")
Hoping to make some videos on deep learning/computer vision projects with this machine. Also would like to compare a laptop like this to using a PC or using a machine in the cloud.
Let me know if you have any questions about the machine or my experiences with it.
Full tech spec range can be found here: lenovo.com/us/en/dc/undefined/laptops/thinkpad/thinkpad-p/ThinkPad-P15-Mobile-Workstation/p/22WSP15P5N1
If you enjoyed this video, make sure to give it a LIKE and SUBSCRIBE if you haven't already :).
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Link to my second channel!
youtube.com/channel/UCge9kgmp38FIjGK4xdJsThw
Project source code: github.com/KeithGalli/auto-publish-youtube-video
@coreyms's YouTube API Tutorials:
Getting Started - youtu.be/th5_9woFJmk
OAuth Access - youtu.be/vQQEaSnQ_bs
YouTube API documentation: developers.google.com/youtube/v3/docs
AWS boto3 library documentation: boto3.amazonaws.com/v1/documentation/api/latest/index.html
Let me know if you have any questions!
Please consider subscribing if you enjoyed this video :)
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Check out my brother's channel (he's currently working on some programming content): youtube.com/c/bobbyg603
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
If you enjoy this video, make sure to SUBSCRIBE to not miss future videos.
Checkout out my new channel where I will frequently be posting problems like these: youtube.com/channel/UCge9kgmp38FIjGK4xdJsThw/about
Feel free to recommend the next problems that I should solve on YouTube!
Links to problems:
LeetCode 1678: leetcode.com/problems/goal-parser-interpretation
LeetCode 1436: leetcode.com/problems/destination-city
LeetCode 1365: leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number
LeetCode 704: leetcode.com/problems/binary-search
LeetCode 409: leetcode.com/problems/longest-palindrome
LeetCode 1561: leetcode.com/problems/maximum-number-of-coins-you-can-get
LeetCode 1472: leetcode.com/problems/design-browser-history
LeetCode 1110: leetcode.com/problems/delete-nodes-and-return-forest
-------------------------
Timeline!
0:00 - Introduction
2:02 - LeetCode 1678 - Goal Parser Interpretation
6:04 - LeetCode 1436 - Destination City
14:07 - LeetCode 1365 - How Many Numbers Are Smaller Than the Current Number
33:13 - LeetCode 704 - Binary Search
46:13 - LeetCode 409 - Longest Palindrome
55:01 - LeetCode 1561 - Maximum Number of Coins You Can Get
1:10:09 - LeetCode 1472 - Design Browser History
1:22:32 - LeetCode 1110 - Delete Nodes And Return Forest
1:38:23 - Conclusion & Announcement!
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
In this video we learn various methods for how we can schedule and automatically run python code. We'll start by looking at cronjobs & windows task scheduler and then we will walk through running tasks in the cloud using AWS Lambda & Cloudwatch. The ultimate goal of this video is to learn how we can automatically generate & send an email with an analytics report every day.
There are methods highlighted in this video that will work on Mac, Linux, & Windows.
~ GitHub resources ~
Link to source code: github.com/KeithGalli/scheduling-code
Link to analytics report code: github.com/KeithGalli/generate-analytics-report/tree/send_email
~ Relevant videos ~
How to generate an analytics report in python: youtu.be/UmN2_R4KEg8
How to send an email with python (@coreyms ): youtu.be/JRCJ6RtE3xU
~ Articles mentioned ~
AWS Lambda memory limits: hackernoon.com/exploring-the-aws-lambda-deployment-limits-9a8384b0bec3
Downloading python linux libraries on Windows: medium.com/@korniichuk/lambda-with-pandas-fd81aa2ff25e
~ Other resources ~
Python email library docs: docs.python.org/3.8/library/email.examples.html
AWS Cron info (scheduling): docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
Lambda package setup: docs.aws.amazon.com/lambda/latest/dg/python-package.html
Thank you to Skillshare for sponsoring this video!
-------------------------
Video timeline!
0:00 - What we’ll be doing in this video
0:56 - Check out Skillshare! (sponsored)
1:56 - How can we automate scripts? Overview of local, cloud, and serverless methods
5:18 - Simple example of local script automation w/ cronjobs & windows task scheduler
18:32 - How to schedule code on a cloud machine (use cronjobs)
18:51 - Simple example of cloud script automation w/ AWS Lambda & Cloudwatch
27:09 - Schedule & automate sending an email locally
45:12 - Schedule & automate sending an email on the cloud w/ Lambda & Cloudwatch
50:18 - Installing python packages in a serverless environment (zip uploads)
55:50 - Generate & schedule sending analytics reports (locally)
1:02:45 - Generate & schedule sending analytics reports in AWS Lambda
1:07:03 - Limitations of lambda (max file upload size)
1:09:00 - Generate & schedule sending analytics reports in AWS Lambda
1:18:32 - Final thoughts & video recap!
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
In this video we see how we can take visualizations that we plot in python libraries like Matplotlib & Plotly and package them into a nice looking analytics report using the fpdf library.
Source code: github.com/keithgalli/generate-analytics-report
Data: github.com/CSSEGISandData/COVID-19
PyFPDF Docs: pyfpdf.readthedocs.io/en/latest
Helpful blog post mentioned: towardsdatascience.com/covid-19-map-animation-with-python-in-5-minutes-2d6246c32e54
Thank you to Skillshare for sponsoring this video!
-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
-------------------------
Video Timeline!
0:00 - What we will be doing in this video
1:30 - Check out Skillshare! (sponsored)
3:00 - Source code & Setup
6:37 - Python FPDF library basics
9:42 - Choosing our paper format (A4, Letter, etc)
11:54 - Adding and resizing images in our PDF!
18:52 - Helper method (which states & countries can we plot?)
21:48 - Continuing to build out our report (exploring source code)
27:17 - Adding additional pages to the report
29:09 - Adding a title to our report
32:37 - Adding a professional letterhead to report
35:00 - Plotting geographic maps with covid-19 data (plotly)
40:02 - Using datetime library to automatically grab & format yesterday’s date
43:46 - Finalizing our report
46:41 - Where are the colors set?
48:11 - Final thoughts
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
In this video we scrape Wikipedia pages to create a dataset on Disney movies.
The video is formatted with tasks for you to try to solve on your own throughout. For the best learning experience, at each task you should pause the video, try the task on your own, and then resume when you want to see how I would solve it.
We cover a wide range of Python & data science topics in this video. They include:
- Web scraping with BeautifulSoup
- Cleaning data
- Testing code with Pytest
- Pattern matching with regular expressions (Re library)
- Working with dates (datetime library)
- Saving & loading data with Pickle library
- Accessing data from an API using Requests library
Link to code & datasets: github.com/KeithGalli/disney-data-science-tasks
Previous tutorial on Beautiful Soup: youtu.be/GjKQ6V_ViQE
If you enjoyed this video, make sure to like & subscribe :)
This video was sponsored by DataCamp
---------------------
Video timeline!
0:00 - Video overview
1:58 - Check out DataCamp! (sponsored)
3:12 - Setup
Task #1: Scrape the infobox from Toy Story 3 wiki page (save in python dictionary) (4:24)
Link: en.wikipedia.org/wiki/Toy_Story_3
Task #2: Scrape infobox for all movies in List of Disney Films (save as list of dictionaries) (28:52)
Link: en.wikipedia.org/wiki/List_of_Walt_Disney_Pictures_films
30:30 - Robots.txt (Are you allowed to scrape a site?)
32:52 - Task #2: Scrape infobox for all movies in List of Disney Films (save as list of dictionaries)
57:27 - Save & Load dataset checkpoint (JSON file)
Task #3: Clean our data! (1:02:04)
1:09:28 - Task #3.1: Strip out all references ([1],[2],etc) from HTML
1:16:39 - Task #3.2: Split up the long strings
1:25:02 - Task #3.3: Examine errors we are getting
1:30:27 - Task #3.4: Convert “Running time” field to an integer
1:44:57 - Task #3.5: Convert “Budget” & “Box office” fields to floats
2:33:53 - Task #3.6: Convert dates into datetime objects
2:47:36 - Saving our data again (using Pickle)
Task #4: Attach IMDB, Metascore, and Rotten Tomatoes scores to dataset (working with APIs) (2:53:18)
Task #5: Save final dataset as a JSON file and as a CSV file (3:13:48)
---------------------
Extra resources!
Setup Jupyter notebook: jupyter.readthedocs.io/en/latest/install/notebook-classic.html
Google Colab (cloud-based notebook): colab.research.google.com
Learn regular expressions: youtu.be/K8L6KVGG-7o
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Thank you to Kylie Ying for providing some useful input for this video! :)
Check out her channel: youtube.com/c/ycubed
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
My equipment:
- Sony a6500 Camera: amzn.to/3ieDe42
- Sigma 16mm Lens: amzn.to/2PAEXEv
- Rode Videomicro Microphone: amzn.to/31APkxJ
- Andycine Camera Monitor: amzn.to/2DVxrSf
- Snagit for screen recording
- Adobe Premiere Pro for video editing
- Adobe Photoshop for thumbnails
Kylie’s equipment:
- iPhone 6
- Phone microphone (I think this one amzn.to/3aoCAOI)
- Quicktime for screen recording
- iMovie for editing
- Photopea for thumbnails
Video Editing Software:
- Adobe Premiere Pro: adobe.com/products/premiere.html | what I use
- Hitfilm Express (free): fxhome.com/hitfilm-express
- Davinci Resolve (free): blackmagicdesign.com/products/davinciresolve
- iMovie
Thumbnail/Banner Editing Software:
- Adobe Photoshop: adobe.com/products/photoshop.html | what I use
- Photopea (free, browser-based): photopea.com
Microphone options (USB connectivity):
- Blue Snowball: amzn.to/2QhrH8h
- Rode NT-USB (more expensive): amzn.to/3ha2b0f
Screen Recording Software:
- Snagit ($50 USD, Windows/Mac): techsmith.com/screen-capture.html | what I use
- OBS: Open Broadcaster Studios (free, Windows/Mac/Linux): obsproject.com
- Flashback Express (free, Windows): flashbackrecorder.com/express
- Quicktime (free, Mac): blog.hubspot.com/marketing/how-to-record-your-screen
- Xbox Windows 10 App (free, Windows): blog.hubspot.com/marketing/how-to-record-your-screen
General strategy to record video:
1. Write out an outline you will follow for your tutorial
2. Implement reference code for project
3. Record tutorial in ~10 minute segments
4. Sync video/screen recording, cut out pauses, fix volume, add effects
5. Make professional thumbnail
6. Give video descriptive title that includes keywords users are looking for
7. Upload!
---------------------
Video timeline!
0:00 - Intro & Video Overview
0:49 - Start with an outline!
1:20 - Planning your tutorial
2:16 - Filming your tutorial (camera equipment, screen recording software)
5:32 - Editing your tutorial (video editing software options, workflow)
9:50 - Final touches to your video (thumbnail, description, general tips)
13:10 - Conclusion & Channel Update
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
In this video we walk through web scraping in Python using the beautiful soup library. We start with a brief introduction to HTML & CSS and discuss what web scraping is. Next we start getting into the basics of the beautiful soup library. This includes how to load a webpage, the basic commands you need to know such as find & find_all, grabbing strings from an HTML elements, etc. The final section of this tutorial is a series of exercises where you can practice your skills. In this section we scrape a webpage for links, we learn how to scrape a table and load it into a pandas dataframe, and we see how you can scrape & download a web image. Hope you enjoy!
I’m looking into making future videos on more complex things you can do with web scraping as well as other libraries that are helpful such as Selenium & ScraPy. Subscribe to not miss those.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Resources used in this video
Simple webpage: keithgalli.github.io/web-scraping/example.html
Example webpage: keithgalli.github.io/web-scraping/webpage.html
Link to source code: github.com/KeithGalli/web-scraping
Beautiful Soup Documentation: crummy.com/software/BeautifulSoup/bs4/doc
CSS Selector Reference: w3schools.com/cssref/css_selectors.asp
---------------------
Learn more about HTML/CSS
@Traversy Media HTML Crash Course: youtu.be/UB1O30fR-EE
@Traversy Media CSS Crash Course: youtu.be/yfoY53QXEnI
Codecademy: codecademy.com/catalog/language/html-css
---------------------
Video timeline!
0:00 - Intro & Video Overview
1:09 - What is web scraping?
3:51 - Introduction to HTML
Using the beautiful soup library (5:29)
6:31 - Loading in a webpage (requests library)
8:21 - Starting to scrape
9:18 - find & find_all methods
16:00 - Finding specific text/strings in our HTML (regex)
18:38 - Select method (CSS path selections)
25:55 - Grabbing the string/text from an HTML element
28:17 - Getting a property of HTML element (href, src, id, class, etc)
29:41 - Code navigation (parents, children, siblings)
Let’s practice our skills! (33:57)
35:53 - Exercise #1: Grab all social links on webpage in 3 different ways
42:09 - Exercise #2: Scrape an HTML table into a Pandas Dataframe
53:09 - Exercise #3: Grab all fun facts that contain the word “is”
57:59 - Exercise #4: Use beautiful soup to help download an image from a webpage
1:04:20 - Exercise #5: Solve the mystery challenge!!!
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Introduction to Neural Nets: youtu.be/aBIGJeHRZLQ
Link to my code (github): github.com/KeithGalli/neural-nets
Link to Google Colab file: colab.research.google.com/drive/1MiRP2fwgGg6zfEnLuOZ_6X7lmeePTFaR?usp=sharing
---------------------
Resources!
Learn more about CNNs
Good written overview: towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53
Good video overview (@CodeEmporium ): youtu.be/m8pOnJxOcqY
Illustrated Examples of CNNs: towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d
MNIST Example: keras.io/examples/mnist_cnn
Learn more about TensorFlow datasets
tensorflow.org/datasets/overview
tensorflow.org/datasets/catalog/overview
Learn more about Kerastuner
Documentation: keras-team.github.io/keras-tuner
@sentdex : youtu.be/vvC15l4CY1Q
@krishnaik06 : youtu.be/OzLAdpqm35E
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Video Timeline!
0:00 Video Overview
0:33 Getting Started (Setup & Installation)
2:24 Finding datasets to use
6:02 Data Preparation
10:26 Additional Data Prep (Convert data to NumPy format)
15:22 Reshape Data & Normalize values between 0-1
19:39 Train our first network to classify images
25:06 Convolutional Neural Net (CNN) approach
28:48 Using GPU on Google Colab (speed up training)
31:22 Improving our CNN (reduce image size, max pooling, dropout, etc)
40:18 Using Kerastuner to automatically pick best hyperparameters
52:50 Save & Load our models
54:16 Plot NumPy arrays as images
57:38 Convert JPG/PNG images to NumPy
1:00:20 Final thoughts
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
In this video we start by walking through some of the basics. We look at why we use neural networks and how they function. We do an overview of network architecture (input layer, hidden layers, output layer). We talk a bit about how you choose how many hidden layers and neurons to have. We also look at hyperparameters like batch size, learning rate, optimizers (adam), activation functions (relu, sigmoid, softmax), and dropout. We finish the first section of the video talking a little about the differences between keras, tensorflow, & pytorch.
Next, we jump into some coding examples to classify data with neural nets. In this section we load in data, do some processing, build our network, fit our data to it, and then finally evaluate our model. The examples get more complex as we go along. Some setup instructions for the coding portion of the video are found below.
To install Tensorflow, download Anaconda: docs.anaconda.com/anaconda/install
Data & code used in tutorial: github.com/KeithGalli/neural-nets
I’m going to post a follow up video to this soon where we walk through a real world example where we automatically classify images of hands for the game of rock, paper, scissors. Hopefully that should be up about 2 weeks from now. (EDIT: part 2 has been posted, link below)
If you enjoyed this video, make sure to like & subscribe. Feel free to leave any questions in the comments section.
Part 2!
youtu.be/44U8jJxaNp8
––––––––––––––––––––––––––––––
Finally by Loxbeats soundcloud.com/loxbeats
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download: http://bit.ly/FinallyLoxbeats
Music promoted by Audio Library youtu.be/fGquX0Te1Yo
––––––––––––––––––––––––––––––
Video timeline!
0:00 Video overview
1:34 Why use neural networks
3:08 How neural nets work (architecture basics)
6:11 Hyperparameter overview (batch size, optimizer, dropout, learning rate, epochs)
7:53 How do we choose layers, neurons, & other parameters?
9:08 Why do we need an activation function?
10:20 What activation function should I use?
11:25 Keras vs Tensorflow vs PyTorch
12:30 Coding starts (github & setup)
14:07 Writing our first neural network (linear example)
18:45 Selecting optimizer & loss function (model.compile)
23:45 Fitting training data to our model (model.fit)
27:31 Shuffle order of training data
30:12 Evaluate model on test data (model.evaluate)
32:00 Example #2: Classifying quadratic data
36:06 Example #3: Classifying 6 clusters of data (try on your own)
41:03 Using network to predict a single data point (model.predict)
43:27 Example #4: Classifying multiple labels at a time (BinaryCrossentropy loss)
55:19 Example #5: Classifying our complex data from start of video
59:00 Conclusion & Next steps of learning neural nets
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Covid-19 Analysis (2:16):
- Johns Hopkins Data: github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_time_series
- Code that I wrote: github.com/KeithGalli/Data-Science-Project-Ideas/blob/master/Covid/Covid%20Analysis.ipynb
- Kaggle: kaggle.com/covid19
- @sentdex kaggle video: youtu.be/S6GVXk6kbcs
- @3blue1brown simulations video: youtu.be/gxAaO2rsdIs
Board Game AI (3:16):
- Overview video: youtu.be/y7AKtWGOPAE
- Implementing minimax algorithm in python: youtu.be/MMLtza3CZFM
- Reinforcement learning (Snake) tutorial: towardsdatascience.com/how-to-teach-an-ai-to-play-games-deep-reinforcement-learning-28f9b920440a
- AlphaZero chess tutorial: towardsdatascience.com/create-ai-for-your-own-board-game-from-scratch-alpha-zero-part-3-f22761372245
- @Google_DeepMind AlphaGo Documentary: youtu.be/WXuK6gekU1Y
Reddit, Data is Beautiful (4:50):
- Thread url: reddit.com/r/dataisbeautiful
- Population changes chart: reddit.com/r/dataisbeautiful/comments/fr8q34/change_in_population_by_county_between_2010_and
- S&P 500 recoveries chart: reddit.com/r/dataisbeautiful/comments/frzlbt/sp_500_recovers_during_major_crashes_oc
Text Sentiment Analysis Tool (6:48):
- My full tutorial (machine learning w/ sklearn): youtu.be/M9Itm95JzL0
- Learn about Transformers: http://jalammar.github.io/illustrated-transformer
- BERT Paper: arxiv.org/pdf/1810.04805.pdf
- Spacy NLP Library: explosion.ai/blog/spacy-transformers
- YouTube API: developers.google.com/youtube/v3/quickstart/python
Sports Analysis (8:34):
- My script to webscrape sports data: github.com/KeithGalli/Data-Science-Project-Ideas/blob/master/Sports/extract_data.py
- Basketball reference site that I scraped: basketball-reference.com/leagues/NBA_2020_per_game.html
Stock Trading Bot (10:12):
- Alpaca Site: https://alpaca.markets/
- Alpaca Tutorials: https://alpaca.markets/docs/get-started-with-alpaca/tutorial-videos/
- Quantopian (to learn more & backtest your trading strategies): quantopian.com/tutorials/getting-started
House Pricing Prediction (12:02):
- Link to competition: kaggle.com/c/house-prices-advanced-regression-techniques
Miscellaneous Kaggle Projects (13:06):
- Kaggle Data: kaggle.com/datasets
- Airbnb Data: kaggle.com/dgomonov/new-york-city-airbnb-open-data
- My real world data science tutorial: youtu.be/eMOA1pPVUc4
Hope you guys enjoyed this video! If you have any questions about any of these projects let me know in the comments. Like & Subscribe if you haven't already :).
Some skills you should hopefully take away from these projects:
- Analysis with Python Pandas Library
- Visualization with Python Matplotlib Library
- AI/Machine Learning skills with scikit learn library
- Regression Techniques
- Exploratory Data Analysis
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------------------------------
~ Intro Music ~
Track: Sunflower — Soyb [Audio Library Release]
Music provided by Audio Library Plus
Watch: youtu.be/dG1U3NuR9Pk
Free Download / Stream: alplus.io/sunflower
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
As always I left a video timeline in the comments! If you enjoy this video please consider giving it a like & subscribe for future content :). If you have any questions let me know in the comments!
Follow the homies!
instagram.com/shaneboyer_
instagram.com/_neos
Source code for Game (original & refactored):
github.com/KeithGalli/Basic-Python-Game
Link to original How to Program a Game (in Python) Tutorial:
youtu.be/-8n91btt5d8
Link to video on Classes & Object Oriented Programming:
youtu.be/tmY6FEF8f1o
Additional information on Getters & Setters:
youtu.be/jCzT9XFZ5bw
Some great resources if you want to write better/cleaner code! (affiliate links)
python.org/dev/peps/pep-0008
amzn.to/2U90SWk
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
Video Timeline! (& some additional resources)
0:00 Video overview & code setup
3:04 Creating a Player Class
10:43 Creating subclasses for our Enemy & HumanPlayer
11:26 Creating a Color class
14:35 Creating a screen class or all our game visuals
27:00 Creating a game class for all our game logic
32:54 Information on Getters & Setters in Python
38:09 Bringing it all together in our main.py file!
43:36 Testing our code & Debugging issues
47:20 if _name_ == "__main__" information
48:26 Creating more difficult game levels using our new class structure!
54:00 Fixing the "cheat" where you can go off the screen
55:44 Loading in custom images as the enemy blocks
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
Download Kite: kite.com
In this video we overview the main things I think are pointing when you are starting to learn about classes & integrate them in your everyday code. In this video we cover:
- why should we use object oriented programming (oop) ?
- the basics of defining a class in python (__init__)
- class methods
- what the heck is "self"?
- Inheritance & Subclassing
- Operator overriding
A timeline is in the comments.
If there are topics you felt like I left out, let me know in the comments! I'll potentially make a follow up video to this one.
For an example of me structuring my code with classes, check out this machine learning video:youtu.be/M9Itm95JzL0
If you want to practice using classes, try rewriting the game we build in this video to use them:youtu.be/-8n91btt5d8
^(I'll update the github repo for that video with my solution to this soon)
Resources:
Github code: github.com/KeithGalli/python-classes-tutorial
Operator overloading: geeksforgeeks.org/operator-overloading-in-python
---------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------
Today’s merch!
Creator: @ChilledCow
Website: teespring.com/stores/chilledcow-shop
---------------------
Video timeline!
0:00 - Introduction
1:34 - Why use classes?
2:27 - Defining our first class in Python
6:05 - Class methods
13:53 - Passing in default keyword arguments (size of our polygons)
20:18 - Inheritance & subclassing (using the super() method)
24:43 - Class method overriding
26:06 - Plotting points with classes
28:09 - Operator overloading
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Link to the last video:
youtu.be/vmEHCJofslg
Link to finished code on GitHub:
github.com/KeithGalli/Pandas-Data-Science-Tasks/tree/master/Misc
Useful resources!
NumPy Tutorial: youtu.be/GB9ByFAIAH4
Pandas Tutorial: youtu.be/vmEHCJofslg
Datetime library documentation: docs.python.org/3/library/datetime.html
Detailed video description!
We start by creating a simple dataframe and programmatically adding rows of product purchases to it. We use the random library to select these products.
We make our data more realistic by utilizing normal distributions and geometric distributions in numpy to spread out the number of purchases we make and the quantity of each item purchased.
We use the datetime library to allow us to generate thousands of different times for each purchase with the most common times peaking around 12pm and 8pm.
We take a list of the most common US street addresses to help us randomly generate addresses for each purchases.
Hope you guys enjoy! Make sure to subscribe if you haven’t already :)
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------------------------------
Today’s merch!
Creator: @Chris Chann
Website: unsatisfied.co
---------------------------------------------
Video Timeline!
0:00 - Intro & Background Info
1:15 - What we're creating in this video!
2:03 - Start writing code (generating a simple dataframe & csv)
8:26 - Task: Making our data more realistic, selecting some products with higher probability than others
14:15 - Task: Generate 12 months worth of data in 12 csvs (calendar library, f-strings)
18:12 - Make some months have more purchases than others
19:28 - Normal distributions in NumPy
23:43 - Improving speed of our code (making testing easier)
26:41 - Task: Generate random addresses for our data
35:03 - Task: Generate order times for purchases (datetime library overview)
40:02 - Using timedelta objects to add & subtract time from dates
45:09 - Generate a realistic quantity ordered for each product (using numpy geometric distribution)
49:38 - Add multiple items being more likely to be sold together and cleaning code a bit
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
In this video we use Python Pandas & Python Matplotlib to analyze and answer business questions about 12 months worth of sales data. The data contains hundreds of thousands of electronics store purchases broken down by month, product type, cost, purchase address, etc.
Setup!
Github source code & data: github.com/KeithGalli/Pandas-Data-Science-Tasks
Installing Jupyter Notebook: jupyter.readthedocs.io/en/latest/install.html
Installing Pandas library: pandas.pydata.org/pandas-docs/stable/install.html
Check out the first video I did on Pandas:
youtu.be/vmEHCJofslg
Check out the videos I did on Matplotlib:
youtu.be/DAQNHzOcO5A
youtu.be/0P7QnIQDBJY
Detailed video description! (timeline can be found in comments)
We start by cleaning our data. Tasks during this section include:
- Drop NaN values from DataFrame
- Removing rows based on a condition
- Change the type of columns (to_numeric, to_datetime, astype)
Once we have cleaned up our data a bit, we move the data exploration section. In this section we explore 5 high level business questions related to our data:
- What was the best month for sales? How much was earned that month?
- What city sold the most product?
- What time should we display advertisemens to maximize the likelihood of customer’s buying product?
- What products are most often sold together?
- What product sold the most? Why do you think it sold the most?
To answer these questions we walk through many different pandas & matplotlib methods. They include:
- Concatenating multiple csvs together to create a new DataFrame (pd.concat)
- Adding columns
- Parsing cells as strings to make new columns (.str)
- Using the .apply() method
- Using groupby to perform aggregate analysis
- Plotting bar charts and lines graphs to visualize our results
- Labeling our graphs
If you enjoy this video, make sure to leave it a like and subscribe to not miss any future similar tutorials :).
Check out the new "solving real world data science tasks" video I posted!
youtu.be/Ewgy-G9cmbg
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------------------------------
Video Timeline!
0:00 - Intro
1:22 - Downloading the Data
2:57 - Getting started with the code (Jupyter Notebook)
Task #1: Merging 12 csvs into a single dataframe (3:35)
4:25 - Read single CSV file
5:44 - List all files in a directory
7:06 - Concatenating files
11:00 - Reading in Updated dataframe
Task #2: Add a Month column (12:48)
14:12 - Parse string in Pandas cell (.str)
Cleaning our data!
17:31 - Drop NaN values from df
21:25 - Remove rows based on condition
Task #3: Add a sales column (24:58)
25:58 - Another way to convert a column to numeric (ints & floats)
Question #1: What was the best month for sales? (29:20)
30:35 - Visualizing our results with bar chart in matplotlib
Question #2: What city sold the most product? (34:17)
35:32 - Add a city column
36:10 - Using the .apply() method (super useful!!)
40:35 - Why do we use the lambda x ?
40:57 - Dropping a column
46:45 - Answering the question (using groupby)
47:34 - Plotting our results
Question #3: What time should we display advertisements to maximize the likelihood of purchases? (52:13)
53:16 - Using to_datetime() method
56:01 - Creating hour & minute columns
58:17 - Matplotlib line graph to plot our results
1:00:15 - Interpreting our results
Question #4: What products are most often sold together? (1:02:17)
1:03:31 - Finding duplicate values in our DataFrame
1:05:43 - Use transform() method to join values from two rows into a single row
1:08:00 - Dropping rows with duplicate values
1:09:39 - Counting pairs of products (itertools, collections)
Question #5: What product sold the most? Why do you think it did? (1:14:04)
1:15:28 - Graphing data
1:18:41 - Overlaying a second Y-axis on existing chart
1:23:41 - Interpreting our results
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Link to donate: teamtrees.org
We start off showing how you can use recursion to make basic tree like structures. We then build on that and use more sophisticated recursive logic to make the trees look pretty realistic.
Next we go through how you can draw paintings in Python. This method works by sampling points in a photograph and drawing brush strokes of the same color in the generated image. It ultimately outputs some pretty cool stuff :).
Check out the first video I made for team trees!
youtu.be/WG42fyCMsD0
Check out Kyle on Instagram for all the awesome nature pictures!
instagram.com/k_rowejo
Thanks for watching everyone!
Thanks @Mark Rober & @MrBeast for all your efforts towards organizing this movement!! :)
---------------------------
Source code (recursive example): github.com/KeithGalli/TeamTrees
I haven’t made the source code for the paintings public yet. Think I’ll post it here sometime in the next couple weeks. Feel free to bug me in the comments in case I forget.
---------------------------
Follow me on Twitter: twitter.com/keithgalli
Follow me on Instagram: instagram.com/keithgalli
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
Source code: github.com/KeithGalli/TeamTrees
In this video, we code up some cool tree animations using the python turtle library to support the #TeamTrees movement! :)
We start off with some basics defining a few different functions to build up to a draw_tree function. Then we look at how you can clean up that base code using a Tree Class. Finally, we take our simple tree and replicate it many times to create some cool artwork.
I'm going to post a part 2 in a couple days where I walk through using recursion to draw some more trees.
Watch Part 2!!
youtu.be/VUYPWxTe4Nw
Python Turtle Graphics Library Tutorial:
youtu.be/pxKu2pQ7ILo
Turtle graphics documentation:
docs.python.org/3.3/library/turtle.html?highlight=turtle
Thanks for watching everyone!
Thanks @MarkRober & @MrBeast for all your efforts towards organizing this movement!! :)
----------------------------
While I was working on this video, I stumbled into some other Coding YouTubers who made cool videos for TeamTrees. If you're looking for similar content, check out!
@The Coding Train : youtube.com/playlist?list=PLRqwX-V7Uu6bxNsa_3SfCPyF9Md9XvXhR
@John Fish : youtu.be/SNdtMjkRVrU
----------------------------
Follow me on Twitter: twitter.com/keithgalli
Follow me on Instagram: instagram.com/keithgalli
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
I'll post some interview practice problem walkthroughs soon!
If you have any questions, let me know in the comments!
Also make sure to SUBSCRIBE if you haven't already :).
Socials:
Instagram: @KeithGalli
Twitter: @KeithGalli
Thank you guys for watching, I appreciate all the support recently!!
-------------------------------------------
Links to sites mentioned
Cracking the Coding Interview Book:
amzn.to/2GpToKj
Leetcode: leetcode.com/problemset/all
HackerRank: hackerrank.com/dashboard
Places to read cool things:
reddit.com/r/Python
reddit.com/r/Programming
reddit.com/r/MachineLearning
medium.com
news.ycombinator.com
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
In this video we walk through a real world python machine learning project using the sci-kit learn library. In it we work our way to building a model that automatically classifies text as either having a positive or negative sentiment. We do this by using amazon reviews as our training data. Full video timeline in the comments!
Link to Code & Data:
github.com/keithgalli/sklearn
Raw Data download:
http://jmcauley.ucsd.edu/data/amazon/
Sci-kit learn documentation:
scikit-learn.org/stable/documentation.html
Make sure you have sci-kit learn downloaded! To do this either run "pip install sklearn" or use python through Anaconda.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------------
Follow me on social media!
Instagram: instagram.com/keithgalli
Twitter: twitter.com/keithgalli
To get one of the cool shirts I was wearing:
instagram.com/pagandvls
---------------------------
Video outline!
0:00 - What we will be doing!
3:40 - Sci-Kit Learn Overview
6:38 - How do we find training data?
9:33 - Download data
11:45 - Load our data into Jupyter Notebook
16:38 - Cleaning our code a bit (building data class)
20:13 - Using Enums
22:50 - Converting text to numerical vectors, bag of words (BOW) explanation
25:45 - Training/Test Split (make sure to "pip install sklearn" !)
33:45 - Bag of words in sklearn (CountVectorizer)
40:05 - fit_transform, fit, transform methods
42:05 - Model Selection (SVM, Decision Tree, Naive Bayes, Logistic Regression) & Classification
47:50 - predict method
53:35 - Analysis & Evaluation (using clf.score() method)
56:58 - F1 score
1:01:01 - Improving our model (evenly distributing positive & negative examples and loading in more data)
1:20:36 - Let's see our model in action! (qualitative testing)
1:22:24 - Tfidf Vectorizer
1:25:40 - GridSearchCv to automatically find the best parameters
1:31:30 - Further NLP improvement opportunities
1:32:50 - Saving our model (Pickle) and reloading it later
1:36:37 - Category Classifier
1:39:14 - Confusion Matrix
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
This video overviews the NumPy library. It provides background information on how NumPy works and how it compares to Python's Built-in lists. This video goes through how to write code with NumPy. It starts with the basics of creating arrays and then gets into more advanced stuff. A full video timeline can be found in the comments.
Link to code used in video: github.com/KeithGalli/NumPy
Feel free to watch at 1.5x to learn more quickly!
If you enjoyed this video, please consider subscribing :).
Let me know your feedback and what I should make a video on next.
----------------------------
Videos of mine that use NumPy
- Creating Connect 4 Game: youtu.be/UYgyRArKDEs
- Plotting (with some use of NumPy): youtu.be/DAQNHzOcO5A
- Generating Mock Data: youtu.be/VJBY2eVtf7o
----------------------------
Links with more information!
NumPy vs Lists:
jakevdp.github.io/blog/2014/05/09/why-python-is-slow
Indexing:
docs.scipy.org/doc/numpy-1.13.0/user/basics.indexing.html
Array Creation Routines:
docs.scipy.org/doc/numpy/reference/routines.array-creation.html
Math Routines Docs:
docs.scipy.org/doc/numpy/reference/routines.math.html
Linear Algebra Docs:
docs.scipy.org/doc/numpy/reference/routines.linalg.html
----------------------------
Video Timeline!
0:00 - Introduction
1:15 - What is NumPy
1:35 - NumPy vs Lists (speed, functionality)
9:17 - Applications of NumPy
11:08 - The Basics (creating arrays, shape, size, data type)
16:08 - Accessing/Changing Specific Elements, Rows, Columns, etc (slicing)
23:14 - Initializing Different Arrays (1s, 0s, full, random, etc...)
31:34 - Problem #1 (How do you initialize this array?)
33:42 - Be careful when copying variables!
35:45 - Basic Mathematics (arithmetic, trigonometry, etc.)
38:20 - Linear Algebra
42:19 - Statistics
43:57 - Reorganizing Arrays (reshape, vstack, hstack)
47:29 - Load data in from a file
50:20 - Advanced Indexing and Boolean Masking
55:59 - Problem #2 (How do you index these values?)
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
In this video, we go through several real-world examples of using the Matplotlib & Pandas libraries to visualize data from CSV files. This is a follow-up to my introductory matplotlib video (youtu.be/DAQNHzOcO5A). Timeline for what we cover can be found in the comments.
We start by creating line graphs of global gas price data over time. We review how to add a title, x & y axis labels, and scale our graph. We review how to customize the style and size of our charts. Next, we look at the FIFA 19 player data to create a histogram, a couple pie charts, and a box and whisker plot.
If you enjoy this video, make sure to LIKE and SUBSCRIBE :) :)
If you have any questions or feedback, please let me know in the comments!
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------------------------------
Link to Source Code & Datasets!
github.com/KeithGalli/matplotlib_tutorial
Matplotlib Documentation:
matplotlib.org/api/_as_gen/matplotlib.pyplot.html
Matplotlib Fonts:
http://jonathansoma.com/lede/data-studio/matplotlib/list-all-fonts-available-in-matplotlib-plus-samples
Matplotlib Style Options:
matplotlib.org/3.1.0/gallery/style_sheets/style_sheets_reference.html
Kaggle Data Link:
kaggle.com/karangadiya/fifa19
---------------------------------------------
Video timeline!
0:00 - Intro & Video Overview
2:22 - Load Necessary Libraries & Download Data
3:48 - Line Graph Example (Plotting Data from CSV file)
21:52 - Histogram Example (FIFA Overall Skill Distribution)
29:25 - Pie Chart #1 (Counting data in CSV) - Visualizing Soccer Foot Preferences
36:41 - Pie Chart #2 (More advance Pandas Example) - Weight Distribution of FIFA Players
47:49 - Box & Whisker Plot (Comparing FIFA teams to one another)
1:00:37 - Final Comments
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
Yay finally posting again. Hopefully this video will help you get comfortable working through the matplotlib library. I'm going to post a follow up video with real-world examples (combining pandas with matplotlib) and different types of plots next week. I originally was going to include that in this one, but I thought the video was getting a bit too long.
In this video we walk through some of the basics of matplotlib. We start by making a simple line graph. We learn how to give the graph a title and label the x & y axis. We learn how to scale the graph by specifying the x & y tickmarks. After this, we restyle our line by passing in keyword arguments then do basically the same thing with a shorthand notation. We resize our graph and save it. Then we end with a simple bar chart.
Source Code (includes code and data for next video as well):
github.com/KeithGalli/matplotlib_tutorial
Matplotlib Pyplot Documentation:
matplotlib.org/api/_as_gen/matplotlib.pyplot.html
Font List:
http://jonathansoma.com/lede/data-studio/matplotlib/list-all-fonts-available-in-matplotlib-plus-samples
Install libraries Needed for this video:
Option 1:
Open up a terminal window and type
pip install matplotlib
pip install numpy
pip install pandas
Option 2:
Download anaconda which will contain all the packages we need. A video on how to do this is here: youtu.be/YJC6ldI3hWk
Thanks for watching! Make sure to like and subscribe to not miss any future videos! Let me know if you have any questions.
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
--------------------------------------------
Video Timeline:
0:00 - Video overview (note real-world examples moved to next video)
1:43 - Setup
2:23 - Our first line graph!
4:50 - Add title and labels for x & y axis
7:13 - Change font type, size, etc.
9:02 - Change tick marks (scale graph)
11:20 - Add a legend
12:25 - Restyle our line (color, line style, markers, width)
15:53 - Shorthand notation to restyle lines
17:27 - List of line customization options
17:55 - Plot more complex lines
22:20 - Resize Graph
24:48 - Save Graph
26:00 - Annotating/Cleaning Code
27:00 - Bar Chart
31:25 - Final Comments
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
In this video, we learn how to build an application with a graphical user interface (GUI). This is a great video to learn how to use the Tkinter library as well as be introduced to some very important Python skills.
We start off by introducing the fundamentals of the Tkinter library. We then create a frame for a weather application. We then connect it to a weather API and then finally convert the application to an executable file.
Source code:
github.com/KeithGalli/GUI
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TKinter Documentation:
tutorialspoint.com/python/python_gui_programming.htm
Hope you enjoyed the video! Make sure to like and subscribe if you haven't already :)
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
----------------------
Some potentially useful videos...
API overview (not my video):
youtube.com/watch?v=7YcW25PHnAA
Working with JSON in Python (not my video):
youtube.com/watch?v=9N6a-VLBa2I
Installing Python:
youtu.be/RJL6Y761TNE
Python Tutorial #1:
youtu.be/XM0CtrJYM2A
----------------------
Video timeline!
0:00 - What we’re ultimately building
2:05 - Getting started
3:16 - The basics of every Tkinter App (Root)
4:44 - Add a button to the screen
6:20 - Passing in keyword arguments
10:07 - Using frames to organize widgets
11:53 - Setting custom colors
14:00 - pack() to place widgets
17:39 - grid() to place widgets
19:53 - place() to place widgets
25:49 - Setting the appearance of our final application
33:45 - Adding background image
36:00 - Implementing button/entry functionality
39:49 - Connecting to the Weather API
43:29 - Making a GET request
51:36 - Formatting our response
56:24 - Changing Font and Font Size
59:58 - How to add weather icons to the app
1:01:36 - Making our App an executable using PyInstaller
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Here is the link to the code we started with: github.com/KeithGalli/Connect4-Python
To understand the theory behind this code, make sure to watch this video on how a board game AI works: youtu.be/y7AKtWGOPAE
To understand alpha-beta pruning, check out this video: youtu.be/l-hh51ncgDI
To build the game we started out with, watch these four videos:
1. youtu.be/UYgyRArKDEs
2. youtu.be/zD-Xuu_Jpe4
3. youtu.be/SDz3P_Ctm7U
4. youtu.be/krCKxcrHeN4
If you want to send me your finished AI, email me: kgmit18@gmail.com
Follow me on social media too please :)
instagram.com/keithgalli
twitter.com/keithgalli
Thanks for watching! Hope you all learning something
SUBSCRIBE to not miss out on any future videos
---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Make sure to SUBSCRIBE to not miss any future videos.
Link to first rock, paper, scissors video:
youtu.be/8TCtYbt7ARI
Source code:
github.com/KeithGalli/rockpaperscissors
Link to setup SublimeREPL:
packagecontrol.io/packages/SublimeREPL
-------------------------
PYTHON TUTORIAL SERIES:
Why Learn Python? +Setup: youtu.be/RJL6Y761TNE
1. Math & Variables: youtu.be/XM0CtrJYM2A
2. Conditional Statements (if, elif, else): youtu.be/vsVGPcfxEiA
3. Functions: youtu.be/5U95tRdYySA
4. Lists & Tuples: youtu.be/_zFI6ytHHdY
5. For Loops & While Loops: youtu.be/WPF5M_Ic6Fc
Learn to Program a game: youtu.be/-8n91btt5d8
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Make sure to SUBSCRIBE to not miss any future videos. Also please let me know what you would like to see me post in the future.
Source Code:
github.com/KeithGalli/rockpaperscissors
Link to setup SublimeREPL:
packagecontrol.io/packages/SublimeREPL
-------------------------
PYTHON TUTORIAL SERIES:
Why Learn Python? +Setup: youtu.be/RJL6Y761TNE
1. Math & Variables: youtu.be/XM0CtrJYM2A
2. Conditional Statements (if, elif, else): youtu.be/vsVGPcfxEiA
3. Functions: youtu.be/5U95tRdYySA
4. Lists & Tuples: youtu.be/_zFI6ytHHdY
5. For Loops & While Loops: youtu.be/WPF5M_Ic6Fc
Learn to Program a game: youtu.be/-8n91btt5d8
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
stratascratch.com/?via=keith
Data & code used in this Tutorial: github.com/KeithGalli/pandas
Python Pandas Documentation: http://pandas.pydata.org/pandas-docs/stable
Let me know if you have any questions!
In this video we walk through many of the fundamental concepts to use the Python Pandas Data Science Library. We start off by installing pandas and loading in an example csv. We then look at different ways to read the data. Read a column, rows, specific cell, etc. Also ways to read data based on conditioning. We then move into some more advanced ways to sort & filter data. We look at making conditional changes to our data. We also start doing aggregate stats using the groupby function. We finished the video talking about how you would work with a very large dataset (many gigabytes)
I realized as I upload this video there are some additional things I want to talk about in a later video. The first thing that comes to mind immediately is using the apply() function on a dataframe to alter the data using a custom or lambda function. If you have questions on this or anything else before I get around to making a part 2, feel free to write me a note in the comments.
If you enjoyed this video, be sure to throw it a like and make sure to subscribe to not miss any future videos!
Thanks for watching friends! Happy coding! :)
Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli
---------------------------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
---------------------------------------------
Link to original source of data from Kaggle: kaggle.com/abcsds/pokemon
---------------------------------------------
Video Outline!
0:00 - Why Pandas?
1:46 - Installing Pandas
2:03 - Getting the data used in this video
3:50 - Loading the data into Pandas (CSVs, Excel, TXTs, etc.)
8:49 - Reading Data (Getting Rows, Columns, Cells, Headers, etc.)
13:10 - Iterate through each Row
14:11 - Getting rows based on a specific condition
15:47 - High Level description of your data (min, max, mean, std dev, etc.)
16:24 - Sorting Values (Alphabetically, Numerically)
18:19 - Making Changes to the DataFrame
18:56 - Adding a column
21:22 - Deleting a column
22:14 - Summing Multiple Columns to Create new Column.
24:14 - Rearranging columns
28:06 - Saving our Data (CSV, Excel, TXT, etc.)
31:47 - Filtering Data (based on multiple conditions)
35:40 - Reset Index
37:41 - Regex Filtering (filter based on textual patterns)
43:08 - Conditional Changes
47:57 - Aggregate Statistics using Groupby (Sum, Mean, Counting)
54:53 - Working with large amounts of data (setting chunksize)
-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.


