Turn numbers into categories with the Pandas "cut" method

  Рет қаралды 5,102

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.

Пікірлер: 23
@faustopf-.
@faustopf-. Жыл бұрын
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 Жыл бұрын
Thanks! I'm lucky to do something I really enjoy.
@vitoslav
@vitoslav Ай бұрын
Great vid! Was looking for such comprehensive explanation on .cut method.
@ReuvenLerner
@ReuvenLerner Ай бұрын
Thanks so much, glad it helped!
@iaroslavd.916
@iaroslavd.916 3 ай бұрын
Cool explanation. Very clear!
@ReuvenLerner
@ReuvenLerner 3 ай бұрын
I'm delighted that it helped!
@Kavrizhka
@Kavrizhka 4 ай бұрын
thanksfor your explanation!👍
@ReuvenLerner
@ReuvenLerner 4 ай бұрын
Glad it helped!
@aleksandarpetrovic2632
@aleksandarpetrovic2632 2 жыл бұрын
Nice tutorial, thank you!
@ReuvenLerner
@ReuvenLerner 2 жыл бұрын
You're welcome!
@oguve278
@oguve278 9 ай бұрын
Exactly what I was looking for, thanks!
@ReuvenLerner
@ReuvenLerner 9 ай бұрын
Excellent, glad to hear it!
@MrTkBL
@MrTkBL 6 ай бұрын
great explanation, that helps me a lot, thanks!
@ReuvenLerner
@ReuvenLerner 6 ай бұрын
I'm delighted to hear it helped!
@sarahzaki03
@sarahzaki03 2 ай бұрын
Really great
@ReuvenLerner
@ReuvenLerner 2 ай бұрын
Glad you enjoyed it!
@moxieable
@moxieable 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@ReuvenLerner this is a tutorial sent from heaven. Thanks
@najsh2
@najsh2 6 ай бұрын
👍👍👍
@ReuvenLerner
@ReuvenLerner 6 ай бұрын
Delighted it helped!
@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,9 М.
Pivot tables with Pandas
9:00
Python and Pandas with Reuven Lerner
Рет қаралды 41 М.
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 28 МЛН
What Pandas users should know about NumPy 2.0 and dtypes
12:08
Python and Pandas with Reuven Lerner
Рет қаралды 1,3 М.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 276 М.
UUID vs INT: What’s Better For Your Primary Key?
9:40
Database Star
Рет қаралды 46 М.
Make Your Pandas Code Lightning Fast
10:38
Rob Mulla
Рет қаралды 184 М.
Python Pandas Lambda Function Tutorial With EXAMPLES
12:58
Ryan & Matt Data Science
Рет қаралды 4,8 М.
This INCREDIBLE trick will speed up your data processes.
12:54
Rob Mulla
Рет қаралды 266 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 271 М.
Boolean indexing in Pandas made simple
8:23
Python and Pandas with Reuven Lerner
Рет қаралды 2 М.
4 Pandas Functions That I Wish I Knew Earlier
4:33
Coding Is Fun
Рет қаралды 25 М.
Turning multiple CSV files into a single pandas data frame
8:09
Python and Pandas with Reuven Lerner
Рет қаралды 30 М.
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 28 МЛН