ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://erikrood.com/Python_References/remove_NaN_pandas_series_final.html |
| Last Crawled | 2026-04-10 17:28:16 (12 hours ago) |
| First Indexed | 2018-10-12 21:22:25 (7 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Remove NaN values from a Pandas series |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | Copyright © Erik Rood 2020 | Twitter |
| Markdown | Toggle navigation
[Erik Rood](http://erikrood.com/)
- [About](http://erikrood.com/contact.html)
- [Contact](http://erikrood.com/contact.html)
Looking to land a data science role? Practice interviewing with a [few questions per week](https://www.interviewqs.com/).
### Remove NaN values from a Pandas series
***
```
import pandas as pd
import numpy as np
```
```
#create series
s = pd.Series([0,4,12,np.NaN,55,np.NaN,2,np.NaN])
```
```
#dropna - will work with pandas dataframe as well
s.dropna()
```
```
0 0.01 4.02 12.04 55.06 2.0dtype: float64
```
***
Copyright © Erik Rood 2020 \| [Twitter](https://www.twitter.com/rood_erik) |
| Readable Markdown | null |
| Shard | 7 (laksa) |
| Root Hash | 6559986673081138407 |
| Unparsed URL | com,erikrood!/Python_References/remove_NaN_pandas_series_final.html s443 |