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
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
An easy solution is to just set display.max_colwidth to -1 like:
pd.set_option('display.max_colwidth', -1)
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.