python pandas get info about all the columns (> 900 columns)

Question:

I have a txt file with more than 900 columns. I would like to look at the datatypes and columnames, but with df.dtypes I don’t get everything, just a fraction. Can I increase this? Is this a setting?

enter image description here

enter image description here

Asked By: Tralala

||

Answers:

Perhaps it depends on the environment where you run you commands. But I hope it might be more universal to do it in a loop.

Maybe not the most elegant option though, but try this:

types = df.dtypes

for index in types.index:
    print(index, types[index])
Answered By: aek
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.