Last active
January 19, 2022 10:14
-
-
Save sh16ma/efd598968a4ef1d6d5650ccefd5498d1 to your computer and use it in GitHub Desktop.
#π #Python #EDA #NaN #γ©γ³γγ³γ° #ζζ¨ι’
This file contains 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
# Looking at NaN % within the data | |
nan = pd.DataFrame(all_df.isna().sum(), columns=['NaN_sum']) | |
nan['feat'] = nan.index | |
nan['ratio(%)'] = (nan['NaN_sum']/all_df.shape[0])*100 | |
nan = nan[nan['NaN_sum'] > 0] | |
nan = nan.sort_values(by = ['NaN_sum']) #option: ascending=False ζι | |
nan['Usability'] = np.where(nan['ratio(%)'] > 20, 'Discard', 'Keep') | |
nan |
Author
sh16ma
commented
Jan 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment