Turn numbers into categories with the Pandas "cut" method
ฝัง
- เผยแพร่เมื่อ 19 ก.ย. 2024
- 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.
Great vid! Was looking for such comprehensive explanation on .cut method.
Thanks so much, glad it helped!
Your passion is contagious! I came here for the pandas cut tutorial, but I also got a motivation boost. Keep up the good work 💪
Thanks! I'm lucky to do something I really enjoy.
Cool explanation. Very clear!
I'm delighted that it helped!
thanksfor your explanation!👍
Glad it helped!
Exactly what I was looking for, thanks!
Excellent, glad to hear it!
Nice tutorial, thank you!
You're welcome!
great explanation, that helps me a lot, thanks!
I'm delighted to hear it helped!
Really great
Glad you enjoyed it!
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
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!
@@ReuvenLerner this is a tutorial sent from heaven.
Thanks
👍👍👍
Delighted it helped!
pd.cut() and it's not supposed to be complicated
It's not supposed to be complicated, but many people don't know it exists, and then get flummoxed trying to use it.