June 2018
Beginner to intermediate
168 pages
3h 40m
English
The dropna for series and DataFrames can be useful for creating a copy of the object where rows of missing information are removed. By default, it drops rows with any missing data, and when used with a series, it eliminates elements with NaN. If you want this done in place, set the inplace parameter to true.
If we only want to remove rows that contain only missing information, and thus no information of any use, we can set the how parameter to all. By default, this method works along rows, but if we want to change it to work along columns, we can set the access argument to 1.
Here's an example of what we just discussed. Let's take this DataFrame, df, and drop any rows where missing data is present:
Notice that ...
Read now
Unlock full access