Reputation: 10429
In my dataframe, I have a one column which has a very large set with a lot of information.
When I do:
df.head()
It crops the column data so I can't see it all. Any ideas how stop the cropping and have scrollbar instead?
Thanks
Upvotes: 0
Views: 1519
Reputation: 1332
An easy solution is to just set display.max_colwidth
to -1
like:
pd.set_option('display.max_colwidth', -1)
Upvotes: 1
Reputation: 17176
The command df.head()
prints the first few rows of a dataframe, df.tail()
the last rows. It is 5 by default, but you could say, e.g., df.head(20)
to get 20 rows.
df
should return the entire data frame and with df[n:m]
you can return the rows from n to m, just df[:5]
is the same as the head function.
See here for more on data frames.
Upvotes: 0