Skip to content

Commit

Permalink
Merge pull request pandas-dev#5599 from y-p/PR_doc_set_max_rows
Browse files Browse the repository at this point in the history
DOC: limit code snippet output to max_rows=15
  • Loading branch information
y-p committed Nov 27, 2013
2 parents 4264e99 + 313bd50 commit d3be761
Show file tree
Hide file tree
Showing 23 changed files with 49 additions and 8 deletions.
1 change: 1 addition & 0 deletions doc/source/10min.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import pandas as pd
np.set_printoptions(precision=4, suppress=True)
options.display.mpl_style='default'
options.display.max_rows=15
#### portions of this were borrowed from the
#### Pandas cheatsheet
Expand Down
1 change: 1 addition & 0 deletions doc/source/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
from pandas.compat import lrange
options.display.max_rows=15
==============================
Essential Basic Functionality
Expand Down
6 changes: 6 additions & 0 deletions doc/source/comparison_with_r.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.. currentmodule:: pandas
.. _compare_with_r:

.. ipython:: python
:suppress:
from pandas import *
options.display.max_rows=15
Comparison with R / R libraries
*******************************

Expand Down
1 change: 1 addition & 0 deletions doc/source/computation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import matplotlib.pyplot as plt
plt.close('all')
options.display.mpl_style='default'
options.display.max_rows=15
Computational tools
===================
Expand Down
1 change: 1 addition & 0 deletions doc/source/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
import pandas as pd
randn = np.random.randn
randint = np.random.randint
Expand Down
19 changes: 11 additions & 8 deletions doc/source/dsintro.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
.. currentmodule:: pandas
.. _dsintro:

************************
Intro to Data Structures
************************

We'll start with a quick, non-comprehensive overview of the fundamental data
structures in pandas to get you started. The fundamental behavior about data
types, indexing, and axis labeling / alignment apply across all of the
objects. To get started, import numpy and load pandas into your namespace:

.. ipython:: python
:suppress:
Expand All @@ -18,6 +10,17 @@ objects. To get started, import numpy and load pandas into your namespace:
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
set_option('display.precision', 4, 'display.max_columns', 8)
options.display.max_rows=15
************************
Intro to Data Structures
************************

We'll start with a quick, non-comprehensive overview of the fundamental data
structures in pandas to get you started. The fundamental behavior about data
types, indexing, and axis labeling / alignment apply across all of the
objects. To get started, import numpy and load pandas into your namespace:

.. ipython:: python
Expand Down
1 change: 1 addition & 0 deletions doc/source/enhancingperf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import csv
from pandas import DataFrame
import pandas as pd
pd.options.display.max_rows=15
import numpy as np
np.random.seed(123456)
Expand Down
1 change: 1 addition & 0 deletions doc/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Frequently Asked Questions (FAQ)
import numpy as np
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
randn = np.random.randn
randint = np.random.randint
np.set_printoptions(precision=4, suppress=True)
Expand Down
1 change: 1 addition & 0 deletions doc/source/gotchas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import numpy as np
from pandas import *
options.display.max_rows=15
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
from pandas.compat import lrange
Expand Down
1 change: 1 addition & 0 deletions doc/source/groupby.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
import matplotlib.pyplot as plt
Expand Down
1 change: 1 addition & 0 deletions doc/source/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import random
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
import pandas as pd
randn = np.random.randn
randint = np.random.randint
Expand Down
1 change: 1 addition & 0 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
plt.close('all')
from pandas import *
options.display.max_rows=15
import pandas.util.testing as tm
clipdf = DataFrame({'A':[1,2,3],'B':[4,5,6],'C':['p','q','r']},
index=['x','y','z'])
Expand Down
1 change: 1 addition & 0 deletions doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
np.random.seed(123456)
from numpy import nan
from pandas import *
options.display.max_rows=15
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
Expand Down
6 changes: 6 additions & 0 deletions doc/source/missing_data.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.. currentmodule:: pandas
.. _missing_data:

.. ipython:: python
:suppress:
from pandas import *
options.display.max_rows=15
*************************
Working with missing data
*************************
Expand Down
7 changes: 7 additions & 0 deletions doc/source/r_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

.. _rpy:

.. ipython:: python
:suppress:
from pandas import *
options.display.max_rows=15
******************
rpy2 / R interface
******************
Expand Down
1 change: 1 addition & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
plt.close('all')
from pandas import *
options.display.max_rows=15
import pandas.util.testing as tm
*************
Expand Down
1 change: 1 addition & 0 deletions doc/source/remote_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
plt.close('all')
from pandas import *
options.display.max_rows=15
import pandas.util.testing as tm
******************
Expand Down
1 change: 1 addition & 0 deletions doc/source/reshaping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
from pandas.core.reshape import *
import pandas.util.testing as tm
randn = np.random.randn
Expand Down
1 change: 1 addition & 0 deletions doc/source/rplot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
np.random.seed(123456)
from pandas import *
options.display.max_rows=15
import pandas.util.testing as tm
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
Expand Down
1 change: 1 addition & 0 deletions doc/source/sparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import matplotlib.pyplot as plt
plt.close('all')
options.display.mpl_style='default'
options.display.max_rows = 15
**********************
Sparse data structures
Expand Down
1 change: 1 addition & 0 deletions doc/source/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
randn = np.random.randn
randint = np.random.randint
np.set_printoptions(precision=4, suppress=True)
options.display.max_rows=15
from dateutil.relativedelta import relativedelta
from pandas.tseries.api import *
from pandas.tseries.offsets import *
Expand Down
1 change: 1 addition & 0 deletions doc/source/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import matplotlib.pyplot as plt
plt.close('all')
options.display.mpl_style = 'default'
options.display.max_rows = 15
from pandas.compat import lrange

************************
Expand Down
1 change: 1 addition & 0 deletions doc/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pandas import *
randn = np.random.randn
np.set_printoptions(precision=4, suppress=True)
options.display.max_rows = 15

**********
What's New
Expand Down

0 comments on commit d3be761

Please sign in to comment.