Drop rows with missing values with pandas dropna // Python pandas dropna, subset, axis, thresh

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

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

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

    Great presentation! You showed how really versatile dropna with its different parameter options. Thank you.

    • @KimberlyFessel
      @KimberlyFessel  9 месяцев назад +3

      Thank you! Glad you liked it, and yes, I totally agree. Many of these pandas methods and functions are super versatile. My main goal for this Pandas Tips series is to show how you can enhance the basic pandas commands to perform lots of useful tasks.

  • @henry-zh3rv
    @henry-zh3rv 2 месяца назад

    I have a dataset that has [x] in two rows. I have tried different ways to remove these rows but none have worked. I have also tried replacing the values with NaN and tried the dropna function but this has not worked. Does anyone know how I can drop these rows?

    • @KimberlyFessel
      @KimberlyFessel  Месяц назад

      Hi there - say you have a dataframe called df and the column with those values is called "col", you could probably do something like this: df = df[df["col"] != "[x]"]
      That overwrites your current dataframe with a dataframe that excludes rows with "[x]" values in the "col" column.

  • @minhnguyen-om1cb
    @minhnguyen-om1cb 5 месяцев назад

    What a great video! Thank you so much for your explanation!

    • @KimberlyFessel
      @KimberlyFessel  5 месяцев назад

      Thank you! You are most welcome and thanks for stopping by ☺

  • @MS-dc2tt
    @MS-dc2tt 7 дней назад

    Thank you! You explained it very well

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

    Thank you! 👍

  • @easyprogramminglessons2943
    @easyprogramminglessons2943 8 месяцев назад

    Mam, im also programmer. I have subscribed your channel

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

    💯

  • @yellowmathboard
    @yellowmathboard 8 месяцев назад

    Wow such a nice way to present this topic in data science. Thank you !!

  • @Kiki-g3g
    @Kiki-g3g 9 месяцев назад

    She's back! Thank you!