Last active
June 15, 2023 21:06
-
-
Save konverner/316c62c8354e93cc486daed01ab27662 to your computer and use it in GitHub Desktop.
show percent of nan values
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
import pandas as pd | |
df = ... | |
pd.options.display.float_format = '{:,.1f}%'.format | |
print((df.isna().sum()/df.shape[0]).sort_values(ascending=False)*100) | |
pd.options.display.float_format = '{:,.2f}'.format |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment