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.

ความคิดเห็น • 23

  • @vitoslav
    @vitoslav หลายเดือนก่อน +1

    Great vid! Was looking for such comprehensive explanation on .cut method.

    • @ReuvenLerner
      @ReuvenLerner  หลายเดือนก่อน

      Thanks so much, glad it helped!

  • @faustopf-.
    @faustopf-. ปีที่แล้ว +4

    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.

  • @iaroslavd.916
    @iaroslavd.916 2 หลายเดือนก่อน +1

    Cool explanation. Very clear!

    • @ReuvenLerner
      @ReuvenLerner  2 หลายเดือนก่อน +1

      I'm delighted that it helped!

  • @Kavrizhka
    @Kavrizhka 3 หลายเดือนก่อน +1

    thanksfor your explanation!👍

    • @ReuvenLerner
      @ReuvenLerner  3 หลายเดือนก่อน

      Glad it helped!

  • @oguve278
    @oguve278 9 หลายเดือนก่อน +1

    Exactly what I was looking for, thanks!

    • @ReuvenLerner
      @ReuvenLerner  9 หลายเดือนก่อน +1

      Excellent, glad to hear it!

  • @aleksandarpetrovic2632
    @aleksandarpetrovic2632 2 ปีที่แล้ว +2

    Nice tutorial, thank you!

  • @MrTkBL
    @MrTkBL 6 หลายเดือนก่อน +1

    great explanation, that helps me a lot, thanks!

    • @ReuvenLerner
      @ReuvenLerner  6 หลายเดือนก่อน

      I'm delighted to hear it helped!

  • @sarahzaki03
    @sarahzaki03 หลายเดือนก่อน +1

    Really great

    • @ReuvenLerner
      @ReuvenLerner  หลายเดือนก่อน

      Glad you enjoyed it!

  • @moxieable
    @moxieable 2 ปีที่แล้ว +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 ปีที่แล้ว +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 ปีที่แล้ว +2

      @@ReuvenLerner this is a tutorial sent from heaven.
      Thanks

  • @najsh2
    @najsh2 5 หลายเดือนก่อน +1

    👍👍👍

    • @ReuvenLerner
      @ReuvenLerner  5 หลายเดือนก่อน

      Delighted it helped!

  • @raymondchougam2958
    @raymondchougam2958 ปีที่แล้ว +1

    pd.cut() and it's not supposed to be complicated

    • @ReuvenLerner
      @ReuvenLerner  ปีที่แล้ว +1

      It's not supposed to be complicated, but many people don't know it exists, and then get flummoxed trying to use it.