Flipping Data with Pandas: Stack & Unstack

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 22

  • @lindyhopwithliz
    @lindyhopwithliz Год назад +2

    You’re great! Lots of vids out there about how to do stuff. Not many about why / in what situations you do the stuff. Thank you!!!

    • @ReuvenLerner
      @ReuvenLerner  Год назад +1

      I'm delighted to hear you found it helpful!

  • @PrateekTrivedi6
    @PrateekTrivedi6 8 месяцев назад +1

    Thanks for such amazing videos. You making learning simple by explaining the functionality and the practical use-cases where the value for that functionality lies.
    I have a doubt - @6:02 - Shouldn't level be 0 when we are unstacking on the basis of passenger count as this is only row label present ?

    • @ReuvenLerner
      @ReuvenLerner  8 месяцев назад +1

      Thanks for the kind words!
      Notice that in many (not all) of the cases in this video, I'm not actually modifying our data frame g. Rather, I'm running a method (e.g., unstack), and getting back a new data frame. This leaves g unchanged, which means that if I first run g.unstack(level=1) and then run g.unstack(level=0), I'm unstacking on the same data frame each time. It's not that after unstacking on level=1 we're left with only one level in the multi-index. Does that make sense?

    • @PrateekTrivedi6
      @PrateekTrivedi6 8 месяцев назад +1

      @@ReuvenLerner Yeah I got it now :) that was super quick response, thanks!!

  • @harshitbhatia5305
    @harshitbhatia5305 Год назад +2

    very nice and infomative. Now I m prepared for my exam :)

  • @saurabhchoudhary4572
    @saurabhchoudhary4572 9 месяцев назад +1

    very nice, exact attention this topic needs 10/10

  • @Don-bv3px
    @Don-bv3px Месяц назад +1

    as clear as day, Thanks!

  • @bojanmilinic
    @bojanmilinic Год назад +1

    Huge thanks

  • @SanjeevKumar-dr6qj
    @SanjeevKumar-dr6qj Год назад +2

    Please make more videos

  • @Frdy12345
    @Frdy12345 Год назад +1

    Super clear, thanks

  • @elu1
    @elu1 Год назад +1

    Nice one! Thanks for the teaching👋

  • @hugoguay4993
    @hugoguay4993 8 месяцев назад +1

    Thank you so much it greatly help for me and my study of Data science

  • @HaniSayadzad
    @HaniSayadzad Месяц назад +1

    u r trully awsome