I'm using Spyder and Python 3.6, the dataframe has up to 3,000 rows, when it is sent to print, I get the data truncated, even if I use print (selecc.to_string()), when the dataframe is printed to a TXT file, I can see the complete data, using the code: np.savetxt('ATPRes.txt', selecc,fmt="%s") Any help will be much appreciated, thanks in advance! P.S. Already tried the option given by a previous answer--> with pd.option_context('display.max_rows', None, 'display.max_columns', 3): print(selecc)
Asked
Active
Viewed 1,875 times
0
-
if you really want to look at 3k rows of data, you could `df.to_csv(filename)` and then open it in excel/openoffice/google sheets. – Stael Jun 13 '17 at 13:52
-
Yes, I did that but wondering if there's a way to display the data on the console. – Liliana Castañón Jun 13 '17 at 13:54
1 Answers
2
use:
#display 9999999 rows
pd.options.display.max_rows = 999999
But be careful, printing out a huge table might take up a lot of memory!
Bubble Bubble Bubble Gut
- 3,152
- 11
- 27