proomt

Search

Search posts, papers, and topics

All posts

Lerner Consulting BlogReuven Lerner1 min readintro

Pandas dropna: The best way to remove NaN values from a series

Summary

This post explains how to remove NaN values from a Pandas Series, recommending the `dropna()` method. It contrasts `dropna()` with using `np.isnan()` or `s.isna()` for filtering, highlighting `dropna()` as the most direct approach.

  • Use `s.dropna()` to remove NaN values from a Pandas Series.
  • `s.isna()` and `s.isnull()` can identify NaN values for filtering.
  • Avoid `np.isnan()` with Pandas Series; `s.isna()` is the Pandas-native equivalent.

This is a fundamental operation for anyone starting with data cleaning in Pandas, as handling missing values is a common first step in data analysis.

3/10

Related reading

  1. Quiz: Introduction to pandas

    Real Python offers a 7‑question interactive quiz covering basic pandas tasks like pulling HTML tables, saving CSVs, DataFrame basics, and method chaining. The page provides only the quiz prompt without explanatory content.

    Real Pythonrealpython.com1 min
  2. Automating EDA With fg-data-profiling

    The Real Python course shows how to automate exploratory data analysis using the fg-data-profiling library. It walks through building, exporting, time‑series profiling, and comparing reports with concise code examples.

    Real Pythonrealpython.com2 min
  3. How Meshtastic Metrics Exporter Turned Eight Prometheus Queries Into One with Tiger Data

    A Python exporter reads Meshtastic mesh telemetry from MQTT and writes it directly into a TimescaleDB‑enabled PostgreSQL instance, replacing a Prometheus setup that hit ~0.5 M series for 10 k nodes. The single database lets Grafana dashboards join node metadata with eight time‑series tables in one query, eliminates scrape‑budget limits, and uses native retention/compression (14‑day compression, 3…

    Timescaletigerdata.com6 min
  4. Understand the top paths users take to convert or drop off with Journey Paths

    Datadog’s Journey Paths visualizes the most common sequences users follow through a defined flow, letting you rank converted vs. dropped‑off paths, spot detours or dead ends, and drill into the underlying user segments with Conversion Analysis, Session Replay, and RUM. It’s a UI‑level feature that augments funnel percentages with concrete path data, but the post offers no implementation details o…

    Datadogdatadoghq.com4 min