I am working with python 3 and the pandas package in visual studio code and I the print() function is not displaying correctly.
For example when I am using df.head() it looks good.
But If I use the print() statement I no longer see all of the columns next to each other, some of them get dragged down for some reason. And I can't see the entire data
Anyone knows what I can do to see the entire data, and all of the columns next to each other?
The problem comes from library pandas
that cuts part of your DataFrame
when it's too long.
To show all rows and columns, use:
pandas.set_option('display.max_rows', None)
pandas.set_option('display.max_columns', None)
If you use an "old" pandas
version use instead:
pandas.set_option('max_row', None)