0

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

4
  • have you tried saving dtypes as an object? Commented Dec 22, 2022 at 7:44
  • How do I do that? Commented Dec 22, 2022 at 7:48
  • your_object = df.dtypes Commented Dec 22, 2022 at 7:56
  • and then display it whatever way. with head() or other methods Commented Dec 22, 2022 at 7:56

1 Answer 1

2

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])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.