Created
May 11, 2020 18:12
-
-
Save Shikhargupta/5d4ddd01eb51dc2d91b846f2a2dc6777 to your computer and use it in GitHub Desktop.
handling_nan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #For BsmtFinSF1 we observed the only datapoint for which the value was missing had BsmtFinType1 as NA i.e | |
| #there is no basement. So we can fill the SF as 0 | |
| df_cum['BsmtFinSF1'] = df_cum['BsmtFinSF1'].fillna(0) | |
| #Same goes for BsmtFinSF2 | |
| df_cum['BsmtFinSF2'] = df_cum['BsmtFinSF2'].fillna(0) | |
| #Same data point is valid for BsmtUnfSF and TotalBsmtSF. We can fill them all with zeros. | |
| df_cum['BsmtUnfSF'] = df_cum['BsmtUnfSF'].fillna(0) | |
| df_cum['TotalBsmtSF'] = df_cum['TotalBsmtSF'].fillna(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment