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!
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.
Real-World Python Machine Learning Tutorial w/ Scikit Learn (sklearn basics, NLP, classifiers, etc)Keith Galli2019-09-30 | Practice your Python Pandas data science skills with problems on StrataScratch! 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!
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.Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup Library)Keith Galli2024-06-08 | Get started w/ Bright Data + $15 free credit using this link! 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
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!
*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.Real-World Dataset Cleaning with Python Pandas! (Olympic Athletes Dataset)Keith Galli2024-04-20 | I'm prepping a dataset for an upcoming tutorial and I figured walking through the process of cleaning it would work well for a livestream! We use various Python Pandas functions to accomplish our data cleaning goals.
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
*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.Solving 100 Python Pandas Problems! (from easy to very difficult)Keith Galli2024-04-13 | In this tutorial, you'll gain hands-on experience with the python pandas library, building experience with data manipulation and analysis skills important for data science. You'll learn how to create, modify, and analyze DataFrames, handle missing data (NaNs), clean messy data, and generate some visualizations. By tackling a variety of problems, from basic data handling to advanced DataFrame techniques, you'll build a solid foundation in managing and interpreting real-world data sets using pandas.
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=keithAsk me anything! (data science, LLMs, landing a job, and more)Keith Galli2024-04-07 | I want to start live streaming on this channel! Figure an AMA is a good way to start. If you have any questions before the live stream starts, leave them in the chat/comments :)
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
*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.Keith Galli Live StreamKeith Galli2024-04-05 | ------------------------- 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
*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.Solving Real-World Data Science Problems with LLMs! (Historical Document Analysis)Keith Galli2024-03-20 | In this video we walk through the process of analyzing historical documents using Python & Large Language Models. We start by setting up LLMs using both closed-source (OpenAI API) and open-source (Llama 2 via Ollama) options. Next, we walk through how we can leverage the LLMs to parse out entities from text. After this we actually start playing around with our data, loading in a specific subcategory of documents from Kaggle and see how we can connect pages from the same documents together. Once this is completed, we repeat the entity parsing process for our actual data to get pieces of information such as names, ages, and locations from our documents. Finally we analyze these entities to learn some insights from our document database.
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
*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.How to make your GitHub more impressive to Employers! (5 simple tips)Keith Galli2024-02-26 | In this video, we look into how you can enhance your GitHub profile to help catch the eye of potential employers. With insights from my experience in hiring for data science and programming roles, we walk through five actionable tips to elevate your GitHub presence. These range from showcasing your coding projects effectively to optimizing your profile's appearance and readability. Whether you're a novice or an experienced coder, these strategies will help you stand out in the competitive job market by demonstrating your ability to build impressive projects with code.
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
*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.Can You Solve These 3 Data Analysis Puzzles? (AnalystBuilder & Python Pandas)Keith Galli2023-12-27 | Check out AnalystBuilder! 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 :)
*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.Python Project: Implement a REST API with Flask & Flasgger Libraries!Keith Galli2023-12-03 | We continue where we left on in the last video and implement two REST endpoints for a book review API. We implement a Get request to retrieve all our reviews and implement a Post request to add a new review to our Airtable database. We use the Flasgger library to create interactive documentation for our endpoints. We use ChatGPT to help us write our endpoints Python code. We use Render.com to deploy our API to a publicly accessible URL
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
*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.How to create & deploy an API in Python! (with interactive documentation)Keith Galli2023-11-26 | In this video, we work through the process of creating and deploying a Python3 based API using libraries such as Flask, Flask-Restful, & Flasgger.
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)
*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.Complete Regular Expressions Tutorial! (with exercises for practice)Keith Galli2023-04-13 | Practice your Python Pandas data science skills with problems on StrataScratch! 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!
*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.)Full Data Science Mock Interview! (featuring Kylie Ying)Keith Galli2023-01-09 | Check out Mobile Pixels! bit.ly/3WKUC55
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!
*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
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.
*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 :)Solving Real-World Data Science Interview Questions! (with Python Pandas)Keith Galli2022-07-26 | Visit brilliant.org/KeithGalli to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription
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.
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
*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 Brilliant5 Jupyter Notebook Tips & Tricks to Improve your Data Science Workflow!Keith Galli2022-06-01 | Visit brilliant.org/KeithGalli to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription
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
------------------------- 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!)Solving real world data science problems with Python! (computer vision edition)Keith Galli2022-05-11 | Practice your Python Pandas data science skills with problems on StrataScratch! 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.
*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 & conclusionWant to land your first data science role??... I have a BIG announcement! (no degree required)Keith Galli2022-05-02 | Apply to the Program! 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 :)
*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 applyComplete Natural Language Processing (NLP) Tutorial in Python! (with examples)Keith Galli2022-03-17 | In this video we go through the major concepts in natural language processing using Python libraries! We use examples to help drill down the concepts. There is content in this video for all skill levels (beginners to experts). I originally recorded this video for the PyCon Conference.
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 :).
~~ 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!Solving real-world data analysis problems with Python Pandas! (Lego dataset analysis)Keith Galli2022-02-28 | In this video we walkthrough a data analysis project on DataCamp. This project has us walk through a Lego dataset and answer a few questions. To do our analysis we use the Pandas library of Python.
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!
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 :)
*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!The Future of Data Science! (Snickerdoodle AI/ML Framework)Keith Galli2022-02-24 | Check out my website! keithgalli.com
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.
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 forwardHow I became an unemployed MIT grad still living with my parents.Keith Galli2022-02-18 | Happy to be back everyone! Here's a full update on what has been going on in my life and why I was absent from YouTube for so long.
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
*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/SQWFdnbzlgIThe data science machine!! (Lenovo ThinkPad P15 unboxing)Keith Galli2021-03-23 | In this video, we unbox the Lenovo ThinkPad P15 Mobile Workstation. Thank you to Lenovo & NVIDIA for sending this my way. More data science projects on the way soon!!
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.
*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.I wrote a program to automatically post a video if I hit 1000 subscribers!Keith Galli2021-02-18 | In this video we use Python, the YouTube API, and AWS Lambda to create a program that can automatically publish (post) a video when a YouTube video hits 1000 subscribers. This was a fun project and I am excited to share it with all of you!
*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.Learn Python, Programming, & Data Science | Channel TrailerKeith Galli2021-02-09 | A brief sample of what this channel is all about. My brother made this as an awesome birthday gift!😊
Check out my brother's channel (he's currently working on some programming content): youtube.com/c/bobbyg603
*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.Solving Coding Interview Questions in Python on LeetCode (easy & medium problems)Keith Galli2021-01-18 | In this video we walk through a series of eight coding interview questions on leetcode. These are algorithms problems that cover topics including data structures, time & space complexity, sorting, binary search, object oriented programming, breadth first search, tree traversals, and more. The difficulty of problems range from easy to medium and get gradually harder as you go through the video.
------------------------- 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.How to Schedule & Automatically Run Python Code!Keith Galli2020-11-27 | The first 1000 people to use the link will get a free trial of Skillshare Premium Membership: https://skl.sh/keithgalli11201
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.
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!
*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.How to Generate an Analytics Report (pdf) in Python!Keith Galli2020-11-11 | The first 1000 people to use the link will get a free trial of Skillshare Premium Membership: https://skl.sh/keithgalli10201
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.
------------------------- 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
*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.Solving real world data science tasks with Python Beautiful Soup! (movie dataset creation)Keith Galli2020-10-01 | Data is everywhere! Enhance your career and acquire new skills by taking a course on DataCamp! Click here to take the first chapter of any course for FREE: bit.ly/36lKg44 (you’ll be supporting my channel too!)
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
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)
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.How to Make a High Quality Tutorial Video! (workflow, camera equipment, and software tools)Keith Galli2020-08-15 | In this video we look at how to make high quality instructional content on youtube and other platforms. We specifically look at a workflow to plan out, record, and then edit picture-in-picture tutorial videos. In addition, we overview some camera equipment that you can use as well as the screen recording & video editing software tools that I recommend.
Thank you to Kylie Ying for providing some useful input for this video! :) Check out her channel: youtube.com/c/ycubed
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
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
*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.Comprehensive Python Beautiful Soup Web Scraping Tutorial! (find/find_all, css select, scrape table)Keith Galli2020-07-11 | Practice your Python Pandas data science skills with problems on StrataScratch! 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.
--------------------- 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!!!
--------------------- 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.Real-World Python Neural Nets Tutorial (Image Classification w/ CNN) | Tensorflow & KerasKeith Galli2020-06-08 | In this video we walk through the process of training a convolutional neural net to classify images of rock, paper, & scissors. We do this using the Tensorflow & Keras libraries. This is a follow-up to the first video I posted on neural networks.
--------------------- 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
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 Networks in Python (what you need to know) | Tensorflow/KerasKeith Galli2020-05-10 | Join the Python Army to get access to perks! 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.
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.
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
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLsPython Data Science Project Ideas! (for all skill levels)Keith Galli2020-04-07 | In this video, we walk through eight project ideas to help you build up your data science skills. All of the resources mentioned in the video can be found here in the description.
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
Join the Python Army to get access to perks! YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join Patreon - patreon.com/keithgalliProfessional Code Refactor! (Cleaning Python Code & Rewriting it to use Classes)Keith Galli2020-03-22 | In this video we take the code from my “How to Program a Game (in Python)” tutorial and refactor it to be of a more professional quality. To do this we abstract out similar parts of the code into their own classes & files. Once the new code is written, we go through some examples of how we can extend its functionality in fun ways. We make a couple more difficult levels of the game which is made very easy by the new code architecture. The final product is a lot more similar to code you would write as a full time software developer at a company like Google, Facebook, etc…
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!
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.Everything you need to know about Classes in Python! (Object Oriented Programming Tutorial)Keith Galli2020-02-29 | Follow me instagram.com/keithgalli for more tech content!
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)
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/LEO4igyXbLsGenerating Mock Data with Python! (NumPy, Pandas, & Datetime Libraries)Keith Galli2020-02-01 | In this video we write a python script to automatically generate a sales dataset. To do this we use the NumPy, Pandas, Calendar, & Datetime libraries. This is ultimately the data that we used in my last video “Solving real world data science problems with python pandas”.
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 :)
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.Solving real world data science tasks with Python Pandas!Keith Galli2020-01-14 | Practice your Python Pandas data science skills with problems on StrataScratch! 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.
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
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
*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.Programming More Trees in Python! (Recursion & Artwork)Keith Galli2019-12-17 | In this video, we code up some more tree animations using python to support the #TeamTrees movement! 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 :).
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.
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.
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!
Join the Python Army to get access to perks! YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join Patreon - patreon.com/keithgalliHow to Prepare for a Programming Interview! (Tips & Tricks)Keith Galli2019-11-19 | In this video we walk through some of my tips for having success in a programming interview. We start with some high level details on how programming interviews work. Next we dive into my favorite places to find practice problems. After this we start talking about some specific tips you can do during an interview to improve your likelihood of receiving an offer. We end the video talking about what you should wear on interview day (men + women).
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 :).
*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.Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping)Keith Galli2019-07-10 | Check out stratascratch.com/?via=keith to practice your Python Pandas data science skills!
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.
---------------------------- 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
*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.Python Plotting Tutorial w/ Matplotlib & Pandas (Line Graph, Histogram, Pie Chart, Box & Whiskers)Keith Galli2019-06-06 | Practice your Python Pandas data science skills with problems on StrataScratch! 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!
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
*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.Intro to Data Visualization in Python with Matplotlib! (line graph, bar chart, title, labels, size)Keith Galli2019-06-01 | Practice your Python Pandas data science skills with problems on StrataScratch! stratascratch.com/?via=keith
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.
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.How to Program a GUI Application (with Python Tkinter)!Keith Galli2019-02-02 | Follow me twitter.com/keithgalli for more Python content!
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.
---------------------- 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.How to Program a Connect 4 AI (implementing the minimax algorithm)Keith Galli2019-01-02 | In this video we take the connect 4 game that we built in the How to Program Connect 4 in Python series and add an expert level AI to it. We start out with a very simple implementation of just dropping a piece randomly and then progress to choosing a column based on score and then finally implementing the minimax algorithm with alpha beta pruning.
*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.Keith Galli Live StreamKeith Galli2018-12-12 | ...Programming Rock, Paper, Scissors with no If Statements (Python)Keith Galli2018-11-23 | Taking the rock, paper, scissors game we programmed in the last video and this time trying to do it with no if statements. I liked the idea of making this video because being able to think about problems in multiple different ways is an important python skill. Let me know if you have any questions, and I hope you enjoy :).
Make sure to SUBSCRIBE to not miss any future videos.
*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.How to program Rock, Paper, Scissors in Python!Keith Galli2018-11-21 | Good exercise to get more comfortable with the python programming syntax. Let me know if you have any questions and I will post the follow up video (programming rock, paper, scissors with no if statements) in the next day or two. Hope you enjoy :)
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.
*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.Complete Python Pandas Data Science Tutorial! (Reading CSV/Excel files, Sorting, Filtering, Groupby)Keith Galli2018-10-26 | Practice your Python Pandas data science skills with problems on StrataScratch! stratascratch.com/?via=keith
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!
--------------------------------------------- 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.