You are apparently confusing things - mention Numpy’s options, but say "table", and your variable has the name df
, which is usually used for Pandas dataframes (which is not the same library, although it makes use of the same).
Anyway we have two things: the method head
, that exists in dataframes, returns the exact number of lines - then df.head(8)
, generates 8 lines, and no more. If you are seeing more data than this, it may be that each element of your dataframe is other arrays. If, for example, inside your dataframe, the items inside the cells are arrays of numpy, the print options will not work.
Anyway, while how many lines are shown from a numpy.ndarray are configured by numpy.set_printoptions(threshold=...)
, the equivalent for pandas.Dataframe elements is
pd.options.display.max_rows = ...
both numpy and pandas boundaries work to the satisfaction - arrays and dataframes larger than the limit size are summarized, otherwise they are displayed in full.
and you used the
set_printoptions
back to a value that fits?– jsbueno
yes, I used the
np.set_printoptions( threshold = 200)
, but nothing happened. the array has 99 elements, it shows the first 30, ..., 69 onwards until the 98.– Douglas
good - you just answered - with Threshold=200, you say that the Rame date will only be reformatted when you have 200 rows. Put Threshold at 8 .
– jsbueno
It would be great, but I just tested with =5 and nothing has changed, there are still 99 items
– Douglas