Skip to content

Commit 31512a2

Browse files
committed
DOC: doc building fixes
1 parent bf6f018 commit 31512a2

File tree

5 files changed

+15
-36
lines changed

5 files changed

+15
-36
lines changed

doc/source/api.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,23 @@ Flat File IO
4747

4848
read_table
4949
read_csv
50+
read_fwf
51+
read_clipboard
5052

5153
.. currentmodule:: pandas.io.excel
5254

5355
.. autosummary::
5456
:toctree: generated/
5557

5658
read_excel
59+
ExcelFile.parse
5760

5861
.. currentmodule:: pandas.io.stata
5962

6063
.. autosummary::
6164
:toctree: generated/
6265

6366
read_stata
64-
read_fwf
65-
read_clipboard
6667

6768
.. currentmodule:: pandas.io.html
6869

@@ -83,15 +84,6 @@ SQL
8384

8485
read_sql
8586

86-
Excel IO
87-
^^^^^^^^
88-
.. currentmodule:: pandas.io.parsers
89-
90-
.. autosummary::
91-
:toctree: generated/
92-
93-
ExcelFile.parse
94-
9587
SQL IO
9688
^^^^^^
9789
.. currentmodule:: pandas.io.sql

doc/source/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Frequently Asked Questions (FAQ)
2626
.. _ref-repr-control:
2727

2828
How do I control the way my DataFrame is displayed?
29-
-------------------------------------------
29+
---------------------------------------------------
3030

3131
Pandas users rely on a variety of environments for using pandas: scripts, terminal,
3232
IPython qtconsole/ notebook, (IDLE, spyder, etc').

doc/source/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ in the method ``to_string`` described above.
10521052
.. note::
10531053

10541054
Not all of the possible options for ``DataFrame.to_html`` are shown here for
1055-
brevity's sake. See :func:`~pandas.DataFrame.to_html` for the full set of
1055+
brevity's sake. See :func:`~pandas.core.frame.DataFrame.to_html` for the full set of
10561056
options.
10571057

10581058
.. ipython:: python

doc/source/v0.11.1.txt

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ API changes
9090
to be inserted if ``True``, default is ``False`` (same as prior to 0.11.1) (GH3679_)
9191
- Implement ``__nonzero__`` for ``NDFrame`` objects (GH3691_, GH3696_)
9292

93-
9493
- IO api
9594

9695
- added top-level function ``read_excel`` to replace the following,
@@ -163,7 +162,7 @@ Enhancements
163162
.. ipython :: python
164163

165164
df = DataFrame({'a': list('ab..'), 'b': [1, 2, 3, 4]})
166-
df.replace(regex=r'\s*\.\s*', value=nan)
165+
df.replace(regex=r'\s*\.\s*', value=np.nan)
167166

168167
to replace all occurrences of the string ``'.'`` with zero or more
169168
instances of surrounding whitespace with ``NaN``.
@@ -172,7 +171,7 @@ Enhancements
172171

173172
.. ipython :: python
174173

175-
df.replace('.', nan)
174+
df.replace('.', np.nan)
176175

177176
to replace all occurrences of the string ``'.'`` with ``NaN``.
178177

@@ -257,24 +256,6 @@ Bug Fixes
257256
- Concat to produce a non-unique columns when duplicates are across dtypes is fixed (GH3602_)
258257
- Allow insert/delete to non-unique columns (GH3679_)
259258

260-
For example you can do
261-
262-
.. ipython :: python
263-
264-
df = DataFrame({'a': list('ab..'), 'b': [1, 2, 3, 4]})
265-
df.replace(regex=r'\s*\.\s*', value=np.nan)
266-
267-
to replace all occurrences of the string ``'.'`` with zero or more
268-
instances of surrounding whitespace with ``NaN``.
269-
270-
Regular string replacement still works as expected. For example, you can do
271-
272-
.. ipython :: python
273-
274-
df.replace('.', np.nan)
275-
276-
to replace all occurrences of the string ``'.'`` with ``NaN``.
277-
278259
- ``DataFrame.from_records`` did not accept empty recarrays (GH3682_)
279260

280261
- ``DataFrame.to_html`` and ``DataFrame.to_latex`` now accept a path for
@@ -322,3 +303,5 @@ on GitHub for a complete list.
322303
.. _GH3682: https://github.com/pydata/pandas/issues/3682
323304
.. _GH3679: https://github.com/pydata/pandas/issues/3679
324305
.. _GH3702: https://github.com/pydata/pandas/issues/3702
306+
.. _GH3691: https://github.com/pydata/pandas/issues/3691
307+
.. _GH3696: https://github.com/pydata/pandas/issues/3696

pandas/core/frame.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ def to_csv(self, path_or_buf, sep=",", na_rep='', float_format=None,
13761376
tupleize_cols=True, **kwds):
13771377
"""
13781378
Write DataFrame to a comma-separated values (csv) file
1379-
1379+
13801380
Parameters
13811381
----------
13821382
path_or_buf : string or file handle / StringIO
@@ -1414,6 +1414,7 @@ def to_csv(self, path_or_buf, sep=",", na_rep='', float_format=None,
14141414
tupleize_cols : boolean, default True
14151415
write multi_index columns as a list of tuples (if True)
14161416
or new (expanded format) if False)
1417+
14171418
"""
14181419
if nanRep is not None: # pragma: no cover
14191420
import warnings
@@ -2421,6 +2422,7 @@ def lookup(self, row_labels, col_labels):
24212422
Example
24222423
-------
24232424
values : ndarray
2425+
24242426
"""
24252427
from itertools import izip
24262428

@@ -3475,7 +3477,8 @@ def bfill(self, axis=0, inplace=False, limit=None):
34753477

34763478
def replace(self, to_replace=None, value=None, inplace=False, limit=None,
34773479
regex=False, infer_types=False, method=None, axis=None):
3478-
"""Replace values given in 'to_replace' with 'value'.
3480+
"""
3481+
Replace values given in 'to_replace' with 'value'.
34793482
34803483
Parameters
34813484
----------
@@ -3561,6 +3564,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
35613564
*are* strings, then you can do this.
35623565
* This method has *a lot* of options. You are encouraged to experiment
35633566
and play with this method to gain intuition about how it works.
3567+
35643568
"""
35653569
if not isinstance(regex, bool) and to_replace is not None:
35663570
raise AssertionError("'to_replace' must be 'None' if 'regex' is "

0 commit comments

Comments
 (0)