0

I'm currently working on a large dataset that prints about 6500 lines of data. Unfortunately, the Python console only prints the last (+-) 100 lines of data, and I would like to expand the console to show all lines. Is there a possibility to do this, or would it be better to export it to e.g. Excel?

1
  • 4
    you should use a file, a simple .txt file or a log file Commented Jul 12, 2022 at 13:20

1 Answer 1

1

Try writing to a text file:

m = "how to\n"
x = ["write\n","to\n","text\n","file"]
with open("file.txt","w") as file:
    file.write(m)      #str input
    file.writelines(x) #list input

Or if your data needs to be formatted like an Excel file, look into the xlsxwriter module. It's generally much better practice to write data to files rather than print to console as far as I know.

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.