Uploaded August 2020 | Updated November 2026, 2 hours ago
In this episode of Python Programming Practice: LeetCode #70 -- Climbing Stairs.
Link to the problem here:
leetcode.com/problems/climbing-stairs
If you don't know Python, you can learn the basics of Python for data analysis by following along with this YouTube guide I created: youtube.com/playlist?list=PLiC1doDIe9rCYWmH9wIEYEXXaJ4KAi3jc
Python Programming Practice is a series focused on teaching practical coding skills by solving exercises on popular coding websites. Note that the solutions seen here may not be the most efficient possible.
I am not going to provide the full code in the video description for this series, since copy and pasting solutions is not in the spirit of doing coding exercises. It is intended that the video will help you think about problems, approaches and how to structure solutions so that you are able to code up a working solution yourself. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only
In this episode of Python Programming Practice: LeetCode #70 -- Climbing Stairs.
Link to the problem here:
leetcode.com/problems/climbing-stairs
If you don't know Python, you can learn the basics of Python for data analysis by following along with this YouTube guide I created: youtube.com/playlist?list=PLiC1doDIe9rCYWmH9wIEYEXXaJ4KAi3jc
Python Programming Practice is a series focused on teaching practical coding skills by solving exercises on popular coding websites. Note that the solutions seen here may not be the most efficient possible.
I am not going to provide the full code in the video description for this series, since copy and pasting solutions is not in the spirit of doing coding exercises. It is intended that the video will help you think about problems, approaches and how to structure solutions so that you are able to code up a working solution yourself. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only



![Python Regex: How To Split a String On Multiple Characters
↓ Code Available Below! ↓
This video shows how to split a string of text based on multiple characters at the same time using the regular expressions package in Python. Splitting strings into parts, often into different words, is a common text processing operation but the base Python split function only splits on a single separator, so if your words are separated by several characters it might not get you what you need. The re.split() function allows you to split on a regular expression pattern, so you can split on multiple characters at the same time.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1
Code used in this Python Code Clip:
import re
lines = Some-files_have+different.characters as|separators
# Default python split works on a single character
lines.split()
# Use re.split() to split on several different characters
re.split(pattern = r[ |.+ ],
string = lines)
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only Python Regex: How To Split a String On Multiple Characters](https://i.ytimg.com/vi/JIEmM87RlT8/mqdefault.jpg)
![How to Remove Duplicate Rows From a Data Frame in Pandas (Python)
↓ Code Available Below! ↓
This video shows how to remove duplicate rows in pandas data frames. Duplicate rows can exist in data due to erroneous data entry or data manipulations like joins and concatenations and should be corrected before performing analysis. In some cases, duplicated rows might be a legitimate feature of the data, but any data set with a unique row index identifier or key column should not have any duplicate rows. Getting rid of duplicate rows is a common data preprocessing step so this task can be achieved easily on Pandas data frames using the data frame method df.dropduplicates()
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1
Code used in this Python Code Clip:
import pandas as pd
data = pd.DataFrame({character: [Goku,Vegeta, Nappa,Goku,Piccolo],
power level: [12000, 16000, 4000, 12000, 3000]})
data
# Use df.drop_duplicates() to remove duplicate rows
data = data.drop_duplicates()
data
** Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only How to Remove Duplicate Rows From a Data Frame in Pandas (Python)](https://i.ytimg.com/vi/JOcLL17QMK4/mqdefault.jpg)




![How to Do Elementwise Math in Python
This video shows how to perform elementwise math operations using base python lists, numpy arrays and on the columns of pandas dataframes.
If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1
Code used in this Python Code Clip:
# Elementwise math on two lists using zip
list1 = [1,2,3,4,5]
list2 = [6,7,8,9,10]
elementwise_result = [l1 + l2 for l1, l2 in zip(list1, list2)]
elementwise_result
# Elementwise math using numpy arrays
import numpy as np
list1 = np.array(list1)
list2 = np.array(list2)
list1 + list2
# Elementwise math on columns in pandas data frames
import pandas as pd
df = pd.DataFrame(data = {list1: list1, list2 : list2})
df.list1 + df.list2
* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .
⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only How to Do Elementwise Math in Python](https://i.ytimg.com/vi/L1nRBSKdDl4/mqdefault.jpg)
