pandas.Series.dropna
pandas 3.1.1 · Series and accessors · method
Drop entries with missing values. For DataFrames, subset restricts the columns considered when dropping rows.
Call syntax
Series.dropna(*, axis=0, inplace=…, how=None, ignore_index=False)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
axis |
Optional Keyword only Default 0 |
{0 or 'index'} Choose which axis the operation acts on. The accepted axis labels depend on the receiver. |
inplace |
Optional Keyword only |
bool Choose whether to change the existing object. Where supported, an in-place call typically returns None. |
how |
Optional Keyword only Default None |
str Choose a policy such as a join type or a missing-value removal rule. |
ignore_index |
Optional Keyword only Default False |
bool Give the resulting axis new integer labels where supported. |
Returns
Series or None