Pandas QUERY // Examples of pandas query with MULTIPLE CONDITIONS and pandas query with a VARIABLE

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 32

  • @sketchytv1321
    @sketchytv1321 Місяць тому +1

    Awesome thanks subscribed

  • @ИванАвито-и6э
    @ИванАвито-и6э 9 місяців тому +1

    Nice video, thx! More information about query:
    - u can check value in column is in the list using 2 methods:
    query('col1 in @list_') or less logical query('col1 == @list_')
    - u can use keywords AND, OR, NOT instead of operators &,|,~
    - u can use straightforwardly pandas built-in methods (include string and date ones):
    query('col1.str.contains("A") and col2.dt.year==2024 and not col3.isna()')

    • @KimberlyFessel
      @KimberlyFessel  9 місяців тому

      Excellent - lots of great options for query! 😄

  • @goodmanshawnhuang
    @goodmanshawnhuang 3 місяці тому +1

    it's a great video, thanks for sharing it, Kimberly!

  • @idris8779
    @idris8779 9 місяців тому +1

    Nice explanation. I will like to see lambda function in pandas in the nearest future. Welldone 👍

    • @KimberlyFessel
      @KimberlyFessel  9 місяців тому

      Oh that's another good one - thanks for the suggestion! Cheers 😃

  • @CaribouDataScience
    @CaribouDataScience 9 місяців тому

    Thanks, that was helpful.

  • @jas0609
    @jas0609 9 місяців тому

    Nice video! I always learn something after watching your videos. Thanks!

    • @KimberlyFessel
      @KimberlyFessel  9 місяців тому

      Oh thank you! Glad you learned some thing new 😄

  • @ziggle314
    @ziggle314 9 місяців тому

    Nice job. The use of the @ symbol is slick. Thanks!

    • @KimberlyFessel
      @KimberlyFessel  9 місяців тому

      Right? I love that little @ symbol. 😀

  • @rskura
    @rskura 8 місяців тому

    Thanks for the concise explanation, Kim!

    • @KimberlyFessel
      @KimberlyFessel  8 місяців тому

      Most welcome! Glad you enjoyed it! 😊

  • @maziarzamani6366
    @maziarzamani6366 Місяць тому

    This video was very, very great
    Thank you very much
    Will you be uploading new videos? 😊

    • @KimberlyFessel
      @KimberlyFessel  Місяць тому

      So glad you enjoyed it! Yes, hopefully some new videos soon!

  • @etudiant24
    @etudiant24 8 місяців тому

    very good bravooo

  • @hariharanganesan6135
    @hariharanganesan6135 8 місяців тому

    Is there a possibility that you could start a machine learning course (from beginner to advanced)

    • @KimberlyFessel
      @KimberlyFessel  8 місяців тому

      Thanks for the suggestion! I’ve been considering more data science/ML videos

  • @easyprogramminglessons2943
    @easyprogramminglessons2943 9 місяців тому

    Hi dear! How are you? Do you teach JavaScript also?

    • @KimberlyFessel
      @KimberlyFessel  9 місяців тому

      Hi there 👋 I have dabbled in JavaScript but not substantially. So to answer your question, not at this time!

  • @tantzer6113
    @tantzer6113 8 місяців тому

    Which runs faster, mask or query?

    • @KimberlyFessel
      @KimberlyFessel  7 місяців тому

      Great question! I haven’t tested it myself, but my understanding is that mask is faster if you have 5 or less subconditions. After that, it’s pretty much a draw. stackoverflow.com/questions/53227279/difference-between-masking-and-querying-pandas-dataframe

  • @gkw1232
    @gkw1232 8 місяців тому

    Hello mam....i have error in seaborn i type
    import seaborn as sns than i press only run without any entering datafram etc so there coming error
    I not getting proper solution
    I uploaded video short in my channel

    • @KimberlyFessel
      @KimberlyFessel  8 місяців тому +1

      That certainly is an interesting error! 😅 I'm not sure what's going on, but I would try restarting your notebook, potentially uninstalling and reinstalling seaborn, and making sure Jupyter Notebook has the right path to your packages.

    • @gkw1232
      @gkw1232 8 місяців тому

      @@KimberlyFessel thank you mam for answering

  • @FelipeCampelo0
    @FelipeCampelo0 6 місяців тому

    I find conditional row selection in square brackets the ugliest thing.
    The Pandas team seem to override every [] with their own functions.

    • @KimberlyFessel
      @KimberlyFessel  6 місяців тому +1

      Yup - query is a great alternative to [ ], though admittedly, I'm a habitual [ ]-er myself 😆

    • @FelipeCampelo0
      @FelipeCampelo0 6 місяців тому

      @@KimberlyFessel 🤣