Pandas info not showing all columns and datatypes

Question:

I am have imported a csv file onto my Jupyter notebook and trying to obtain all the columns names and datatypes using the info() function. However, I get the following image. Any idea how to resolve it? I can’t view all the columns and datatypes, only this vague information

enter image description here

Thanks!

Answers:

use verbose as argument to info, it gives option to print the full summary. see full documentation here

You can also use show_counts (or null_counts for older pandas version since it was deprecated since pandas 1.2.0) argument to see null count information

For pandas >= 1.2.0:
df.info(verbose=True, show_counts=True)

For pandas <1.2.0:
df.info(verbose=True, null_counts=True)

Answered By: A.B
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.