Turn numbers into categories with the Pandas "cut" method

  Рет қаралды 4,559

Python and Pandas with Reuven Lerner

Python and Pandas with Reuven Lerner

Жыл бұрын

How can you turn numeric data into categorical data? Pandas provides us with a simple solution, namely the "cut" method. In this video, I demonstrate how "cut" works, and compare it with the manual creation of categories.

Пікірлер: 19
@faustopf-.
@faustopf-. 11 ай бұрын
Your passion is contagious! I came here for the pandas cut tutorial, but I also got a motivation boost. Keep up the good work 💪
@ReuvenLerner
@ReuvenLerner 11 ай бұрын
Thanks! I'm lucky to do something I really enjoy.
@iaroslavd.916
@iaroslavd.916 20 күн бұрын
Cool explanation. Very clear!
@ReuvenLerner
@ReuvenLerner 20 күн бұрын
I'm delighted that it helped!
@MrTkBL
@MrTkBL 4 ай бұрын
great explanation, that helps me a lot, thanks!
@ReuvenLerner
@ReuvenLerner 4 ай бұрын
I'm delighted to hear it helped!
@Kavrizhka
@Kavrizhka Ай бұрын
thanksfor your explanation!👍
@ReuvenLerner
@ReuvenLerner Ай бұрын
Glad it helped!
@oguve278
@oguve278 6 ай бұрын
Exactly what I was looking for, thanks!
@ReuvenLerner
@ReuvenLerner 6 ай бұрын
Excellent, glad to hear it!
@aleksandarpetrovic2632
@aleksandarpetrovic2632 Жыл бұрын
Nice tutorial, thank you!
@ReuvenLerner
@ReuvenLerner Жыл бұрын
You're welcome!
@najsh2
@najsh2 3 ай бұрын
👍👍👍
@ReuvenLerner
@ReuvenLerner 3 ай бұрын
Delighted it helped!
@moxieable
@moxieable Жыл бұрын
This tutorial will be of immense help. I have a derived dataframe that I have been trying to categorize using python, can I apply the cut method to the entire dataframe? Thank you, Sir
@ReuvenLerner
@ReuvenLerner Жыл бұрын
The Pandas docs say that the argument to pd.cut must be 1-dimensional. So you would have to run pd.cut once for each column you want to translate. Glad the tutorial was helpful!
@moxieable
@moxieable Жыл бұрын
@@ReuvenLerner this is a tutorial sent from heaven. Thanks
@raymondchougam2958
@raymondchougam2958 Жыл бұрын
pd.cut() and it's not supposed to be complicated
@ReuvenLerner
@ReuvenLerner Жыл бұрын
It's not supposed to be complicated, but many people don't know it exists, and then get flummoxed trying to use it.
Understanding (and avoiding) the SettingWithCopyWarning in Pandas
8:11
Python and Pandas with Reuven Lerner
Рет қаралды 3,6 М.
How do I make my pandas DataFrame smaller and faster?
19:06
Data School
Рет қаралды 66 М.
Русалка
01:00
История одного вокалиста
Рет қаралды 5 МЛН
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 72 МЛН
The six most important read_csv arguments in Pandas
16:50
Python and Pandas with Reuven Lerner
Рет қаралды 2,7 М.
Interpolating missing values (NaN) in Pandas data frames
10:50
Python and Pandas with Reuven Lerner
Рет қаралды 2,4 М.
Pandas Get Dummies | pd.get_dummies()
4:23
Greg Kamradt (Data Indy)
Рет қаралды 19 М.
Flipping Data with Pandas: Stack & Unstack
8:17
Python and Pandas with Reuven Lerner
Рет қаралды 2,5 М.
How to filter a pandas DataFrame | 6 HELPFUL METHODS
17:27
Chart Explorers
Рет қаралды 28 М.
Scraping HTML tables into Pandas with read_html
6:30
Python and Pandas with Reuven Lerner
Рет қаралды 7 М.
What Pandas users should know about NumPy 2.0 and dtypes
12:08
Python and Pandas with Reuven Lerner
Рет қаралды 954
Make Your Pandas Code Lightning Fast
10:38
Rob Mulla
Рет қаралды 178 М.
Pandas Stack Dataframes
8:06
Automate with Rakesh
Рет қаралды 400
cut and qcut Method of Pandas Library Explained in Details
18:19
RegenerativeToday
Рет қаралды 3,6 М.
Красиво, но телефон жаль
0:32
Бесполезные Новости
Рет қаралды 754 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54