Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Show the entire output when pandas dataframe is big (when many nan values in multiple columns need to be shown)

What kind of pandas display setting (or whatever) is required if I want to see the entire output of the following :

enter image description here

As you can see there are only few lines but I would like to see everything (669 in total) where I would be able to see each line individually to see how many nan values there are in total per line (such that I find the 27 along the dataframe).

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can try:

DataFrame.to_string()

Or:

DataFrame.to_markdown()

Or:

pandas.set_option('display.max_rows', None)

Now you could decide to just display NaN values like this:

-by column:

df[df['column name'].isna()]

-or for entire dataframe:

df[df.isna().any(axis=1)]

Please accept ✅ this answer if it solved your problem, it motivates me 🙂

Otherwise mention me (using @) in comment while telling me what’s wrong 😉

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading