I want to see the entire row for a dask dataframe without the fields being cutoff, in pandas the command is pd.set_option('display.max_colwidth', -1)
, is there an equivalent for dask? I was not able to find anything.
Asked
Active
Viewed 3,180 times
3

Maria Nazari
- 660
- 1
- 9
- 27
2 Answers
2
You can import pandas and use pd.set_option()
and Dask will respect pandas' settings.
import pandas as pd
# Don't truncate text fields in the display
pd.set_option("display.max_colwidth", -1)
dd.head()
And you should see the long columns. It 'just works.'

rjurney
- 4,824
- 5
- 41
- 62
0
Dask does not normally display the data in a dataframe at all, because it represents lazily-evaluated values. You may want to get a specific row by index, using the .loc
accessor (same as in Pandas, but only efficient if the index is known to be sorted).
If you meant to get the whole list of columns only, you can get this by the .columns
attribute.

mdurant
- 27,272
- 5
- 45
- 74
-
1what if I just what to view one row, not the entire data set. My goal is to view the format of one url cell in my data just to see everything it contains – Maria Nazari Jan 02 '19 at 16:52
-
use `.head(1)` ? – mdurant Jan 02 '19 at 18:07
-
@mdurant Uhhh right, but we need to see the actual data in its entirety, or more than the default value. Without `display.max_colwidth` we can only see a tiny part of text. This is an enormous problem for doing NLP with Dask. I posted the right answer below. – rjurney Nov 21 '19 at 22:17