Retrieving from a multi-index in Pandas

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

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

  • @stevenherren4124
    @stevenherren4124 2 месяца назад +1

    You make this so much easier to understand

    • @ReuvenLerner
      @ReuvenLerner  2 месяца назад

      I'm delighted to hear it helped!

  • @horoshuhin
    @horoshuhin 2 года назад +4

    your level of delivery of the material is one of the greatest I've seen. can't stress this enough. I'd prefer your videos over pandas documentation any day:). especially when describing edge cases, thanks

    • @ReuvenLerner
      @ReuvenLerner  2 года назад

      Thanks so much; I really appreciate it!

  • @CHeRKeSSS00
    @CHeRKeSSS00 7 месяцев назад +1

    OMG! OMG! OMG! What a content! I am speachless! After buying so many online courses I found you for free? OMG! OMG! OMG!

    • @ReuvenLerner
      @ReuvenLerner  7 месяцев назад

      I'm so delighted you enjoyed it!

    • @CHeRKeSSS00
      @CHeRKeSSS00 7 месяцев назад +1

      @@ReuvenLerner I was wondering if you teach on any other platforms? Anywhere to look at your courses? Thanks

    • @ReuvenLerner
      @ReuvenLerner  6 месяцев назад

      @@CHeRKeSSS00 Yup, check out LernerPython.com -- lots of courses there!

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

    Amazing..one of the most underrated Python/Pandas content creators.
    Awesome stuff Sir!

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

    Absolutely awesome

  • @alanhernandez7201
    @alanhernandez7201 2 года назад +1

    Hi Reuven! what happens if I have unique values, and I I want to know they qtys of each of them, how do I reshape in order to calculate that? by the way your Oreilly course was great!

    • @ReuvenLerner
      @ReuvenLerner  2 года назад

      Thanks so much, and great to see you here!
      I'm not 100% sure what you're asking here, but you can always group on a column and then use the "count" aggregate function to find out how many times each value appeared.
      If that's not what you meant, then let me know!

  • @nguyenuchuy0330
    @nguyenuchuy0330 2 года назад +1

    tNice tutorials doesn't seem to work.

    • @ReuvenLerner
      @ReuvenLerner  2 года назад

      What part didn't work for you? BTW, you can get the Jupyter notebook I used from GitHub, if that'll help.

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

    Hi Reuven!
    for even more flexibility when selecting from multi-index data frames, you can use the 'get_level_values' method, for example like here:
    df[
    df.index.get_level_values('Year').isin([1993, 1920, 2010]) &
    df.index.get_level_values('Sport').isin(['Archery', 'Judo']) &
    (df.Age < 24.0)
    ]

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

      Excellent! I really like using xs, too.