31. dropna | Handling Missing Values Using Pandas | Part 4

Published: 17 November 2020
on channel: Data Thinkers
698
17

Dropna | Handling Missing Values in Pandas | Part 4

Syntax:

data.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)
---------------------------------------------------
1. Do you want to drop rows or columns having missing values?
0, or 'index' : Drop rows which contain missing values.
1, or 'columns' : Drop columns which contain missing value.
---------------------------------------------------
data.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)

2. Do you want to drop rows or columns having at least one missing value or all missing values?

'any' : If any NA values are present, drop that row or column.
'all' : If all values are NA, drop that row or column.
---------------------------------------------------
data.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)

3. Do you want to set some threshold value to drop missing values?

thresh : int, optional
Require that many non-NA values.
---------------------------------------------------
data.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)

4. Do you want to drop rows of some selected columns only?

subset: Define in which column(s) to look for missing values.
------------------------------------------------
data.dropna(axis=0, how='any', thresh=None, subset=None, inplace=False)

5. Do you want to drop rows or columns temporarily or permanently?

inplace : bool, default False
If True, do operation inplace and return None.
---------------------------------------------
Github Link: https://github.com/PRIYANG-BHATT/Data...

If you enjoy these tutorials, like the video, and give it a thumbs up, and also share these videos with your friends and families if you think these videos would help him.
Please consider clicking the SUBSCRIBE button to be notified of future videos.