Skip to content

Commit 806da06

Browse files
committed
DOC: wide frame repr examples in dsintro #2477
1 parent d2a61c3 commit 806da06

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

doc/source/dsintro.rst

+36-1
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,41 @@ DataFrame in tabular form, though it won't always fit the console width:
598598
599599
print baseball.ix[-20:, :12].to_string()
600600
601+
New since 0.10.0, wide DataFrames will now be printed across multiple rows by
602+
default:
603+
604+
.. ipython:: python
605+
606+
DataFrame(randn(3, 12))
607+
608+
You can change how much to print on a single row by setting the ``line_width``
609+
option:
610+
611+
.. ipython:: python
612+
613+
set_option('line_width', 40) # default is 80
614+
615+
DataFrame(randn(3, 12))
616+
617+
.. ipython:: python
618+
:suppress:
619+
620+
reset_option('line_width')
621+
622+
You can also disable this feature via the ``expand_frame_repr`` option:
623+
624+
.. ipython:: python
625+
626+
set_option('expand_frame_repr', False)
627+
628+
DataFrame(randn(3, 12))
629+
630+
.. ipython:: python
631+
:suppress:
632+
633+
reset_option('expand_frame_repr')
634+
635+
601636
DataFrame column types
602637
~~~~~~~~~~~~~~~~~~~~~~
603638

@@ -904,7 +939,7 @@ Here we slice to a Panel4D.
904939
slicer = Panel4D,
905940
axis_aliases = { 'major' : 'major_axis', 'minor' : 'minor_axis' },
906941
stat_axis = 2)
907-
942+
908943
p5d = Panel5D(dict(C1 = p4d))
909944
p5d
910945

doc/source/visualization.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ subplots:
283283
df.diff().hist(color='k', alpha=0.5, bins=50)
284284
285285
286-
New since 0.9.2, the ``by`` keyword can be specified to plot grouped histograms:
286+
New since 0.10.0, the ``by`` keyword can be specified to plot grouped histograms:
287287

288288
.. ipython:: python
289289
:suppress:

0 commit comments

Comments
 (0)