Skip to content

Commit d3be761

Browse files
author
y-p
committed
Merge pull request #5599 from y-p/PR_doc_set_max_rows
DOC: limit code snippet output to max_rows=15
2 parents 4264e99 + 313bd50 commit d3be761

23 files changed

+49
-8
lines changed

doc/source/10min.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import pandas as pd
1414
np.set_printoptions(precision=4, suppress=True)
1515
options.display.mpl_style='default'
16+
options.display.max_rows=15
1617
1718
#### portions of this were borrowed from the
1819
#### Pandas cheatsheet

doc/source/basics.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
randn = np.random.randn
1010
np.set_printoptions(precision=4, suppress=True)
1111
from pandas.compat import lrange
12+
options.display.max_rows=15
1213
1314
==============================
1415
Essential Basic Functionality

doc/source/comparison_with_r.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
.. currentmodule:: pandas
22
.. _compare_with_r:
33

4+
.. ipython:: python
5+
:suppress:
6+
7+
from pandas import *
8+
options.display.max_rows=15
9+
410
Comparison with R / R libraries
511
*******************************
612

doc/source/computation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import matplotlib.pyplot as plt
1414
plt.close('all')
1515
options.display.mpl_style='default'
16+
options.display.max_rows=15
1617
1718
Computational tools
1819
===================

doc/source/cookbook.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111
np.random.seed(123456)
1212
from pandas import *
13+
options.display.max_rows=15
1314
import pandas as pd
1415
randn = np.random.randn
1516
randint = np.random.randint

doc/source/dsintro.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
.. currentmodule:: pandas
22
.. _dsintro:
33

4-
************************
5-
Intro to Data Structures
6-
************************
7-
8-
We'll start with a quick, non-comprehensive overview of the fundamental data
9-
structures in pandas to get you started. The fundamental behavior about data
10-
types, indexing, and axis labeling / alignment apply across all of the
11-
objects. To get started, import numpy and load pandas into your namespace:
124

135
.. ipython:: python
146
:suppress:
@@ -18,6 +10,17 @@ objects. To get started, import numpy and load pandas into your namespace:
1810
randn = np.random.randn
1911
np.set_printoptions(precision=4, suppress=True)
2012
set_option('display.precision', 4, 'display.max_columns', 8)
13+
options.display.max_rows=15
14+
15+
16+
************************
17+
Intro to Data Structures
18+
************************
19+
20+
We'll start with a quick, non-comprehensive overview of the fundamental data
21+
structures in pandas to get you started. The fundamental behavior about data
22+
types, indexing, and axis labeling / alignment apply across all of the
23+
objects. To get started, import numpy and load pandas into your namespace:
2124

2225
.. ipython:: python
2326

doc/source/enhancingperf.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import csv
1010
from pandas import DataFrame
1111
import pandas as pd
12+
pd.options.display.max_rows=15
1213
1314
import numpy as np
1415
np.random.seed(123456)

doc/source/faq.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Frequently Asked Questions (FAQ)
1212
import numpy as np
1313
np.random.seed(123456)
1414
from pandas import *
15+
options.display.max_rows=15
1516
randn = np.random.randn
1617
randint = np.random.randint
1718
np.set_printoptions(precision=4, suppress=True)

doc/source/gotchas.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import os
88
import numpy as np
99
from pandas import *
10+
options.display.max_rows=15
1011
randn = np.random.randn
1112
np.set_printoptions(precision=4, suppress=True)
1213
from pandas.compat import lrange

doc/source/groupby.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import numpy as np
88
np.random.seed(123456)
99
from pandas import *
10+
options.display.max_rows=15
1011
randn = np.random.randn
1112
np.set_printoptions(precision=4, suppress=True)
1213
import matplotlib.pyplot as plt

doc/source/indexing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import random
1010
np.random.seed(123456)
1111
from pandas import *
12+
options.display.max_rows=15
1213
import pandas as pd
1314
randn = np.random.randn
1415
randint = np.random.randint

doc/source/io.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
plt.close('all')
2121
2222
from pandas import *
23+
options.display.max_rows=15
2324
import pandas.util.testing as tm
2425
clipdf = DataFrame({'A':[1,2,3],'B':[4,5,6],'C':['p','q','r']},
2526
index=['x','y','z'])

doc/source/merging.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
np.random.seed(123456)
99
from numpy import nan
1010
from pandas import *
11+
options.display.max_rows=15
1112
randn = np.random.randn
1213
np.set_printoptions(precision=4, suppress=True)
1314

doc/source/missing_data.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
.. currentmodule:: pandas
22
.. _missing_data:
33

4+
.. ipython:: python
5+
:suppress:
6+
7+
from pandas import *
8+
options.display.max_rows=15
9+
410
*************************
511
Working with missing data
612
*************************

doc/source/r_interface.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
.. _rpy:
44

5+
.. ipython:: python
6+
:suppress:
7+
8+
from pandas import *
9+
options.display.max_rows=15
10+
11+
512
******************
613
rpy2 / R interface
714
******************

doc/source/release.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
plt.close('all')
2121
2222
from pandas import *
23+
options.display.max_rows=15
2324
import pandas.util.testing as tm
2425
2526
*************

doc/source/remote_data.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
plt.close('all')
2020
2121
from pandas import *
22+
options.display.max_rows=15
2223
import pandas.util.testing as tm
2324
2425
******************

doc/source/reshaping.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import numpy as np
88
np.random.seed(123456)
99
from pandas import *
10+
options.display.max_rows=15
1011
from pandas.core.reshape import *
1112
import pandas.util.testing as tm
1213
randn = np.random.randn

doc/source/rplot.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import numpy as np
88
np.random.seed(123456)
99
from pandas import *
10+
options.display.max_rows=15
1011
import pandas.util.testing as tm
1112
randn = np.random.randn
1213
np.set_printoptions(precision=4, suppress=True)

doc/source/sparse.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import matplotlib.pyplot as plt
1414
plt.close('all')
1515
options.display.mpl_style='default'
16+
options.display.max_rows = 15
1617
1718
**********************
1819
Sparse data structures

doc/source/timeseries.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
randn = np.random.randn
1212
randint = np.random.randint
1313
np.set_printoptions(precision=4, suppress=True)
14+
options.display.max_rows=15
1415
from dateutil.relativedelta import relativedelta
1516
from pandas.tseries.api import *
1617
from pandas.tseries.offsets import *

doc/source/visualization.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import matplotlib.pyplot as plt
1414
plt.close('all')
1515
options.display.mpl_style = 'default'
16+
options.display.max_rows = 15
1617
from pandas.compat import lrange
1718
1819
************************

doc/source/whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from pandas import *
1010
randn = np.random.randn
1111
np.set_printoptions(precision=4, suppress=True)
12+
options.display.max_rows = 15
1213
1314
**********
1415
What's New

0 commit comments

Comments
 (0)