Skip to content

Commit 610d3d5

Browse files
prabhjotsummanjreback
authored andcommitted
DOC: Added the note for display.max_colwidth in dsintro.rst
closes #9784 closes #12682
1 parent c3ab8b1 commit 610d3d5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/source/dsintro.rst

+15
Original file line numberDiff line numberDiff line change
@@ -720,10 +720,25 @@ option:
720720
721721
pd.DataFrame(np.random.randn(3, 12))
722722
723+
You can adjust the max width of the individual columns by setting ``display.max_colwidth``
724+
725+
.. ipython:: python
726+
727+
datafile={'filename': ['filename_01','filename_02'],
728+
'path': ["media/user_name/storage/folder_01/filename_01",
729+
"media/user_name/storage/folder_02/filename_02"]}
730+
731+
pd.set_option('display.max_colwidth',30)
732+
pd.DataFrame(datafile)
733+
734+
pd.set_option('display.max_colwidth',100)
735+
pd.DataFrame(datafile)
736+
723737
.. ipython:: python
724738
:suppress:
725739
726740
pd.reset_option('display.width')
741+
pd.reset_option('display.max_colwidth')
727742
728743
You can also disable this feature via the ``expand_frame_repr`` option.
729744
This will print the table in one block.

0 commit comments

Comments
 (0)