Skip to content

Commit e5a49ff

Browse files
committed
DOC: io.rst top-level can now click on read/write methods to acess the appropriate sections
DOC: cleaned v0.13.txt
1 parent 8ce7687 commit e5a49ff

File tree

3 files changed

+66
-54
lines changed

3 files changed

+66
-54
lines changed

doc/source/io.rst

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@ IO Tools (Text, CSV, HDF5, ...)
3232
The Pandas I/O api is a set of top level ``reader`` functions accessed like ``pd.read_csv()`` that generally return a ``pandas``
3333
object.
3434

35-
* ``read_csv``
36-
* ``read_excel``
37-
* ``read_hdf``
38-
* ``read_sql``
39-
* ``read_json``
40-
* ``read_msgpack`` (experimental)
41-
* ``read_html``
42-
* ``read_gbq`` (experimental)
43-
* ``read_stata``
44-
* ``read_clipboard``
45-
* ``read_pickle``
35+
* :ref:`read_csv<io.read_csv_table>`
36+
* :ref:`read_excel<io.excel>`
37+
* :ref:`read_hdf<io.hdf5>`
38+
* :ref:`read_sql<io.sql>`
39+
* :ref:`read_json<io.json_reader>`
40+
* :ref:`read_msgpack<io.msgpack>` (experimental)
41+
* :ref:`read_html<io.read_html>`
42+
* :ref:`read_gbq<io.bigquery>` (experimental)
43+
* :ref:`read_stata<io.stata_reader>`
44+
* :ref:`read_clipboard<io.clipboard>`
45+
* :ref:`read_pickle<io.pickle>`
4646

4747
The corresponding ``writer`` functions are object methods that are accessed like ``df.to_csv()``
4848

49-
* ``to_csv``
50-
* ``to_excel``
51-
* ``to_hdf``
52-
* ``to_sql``
53-
* ``to_json``
54-
* ``to_msgpack`` (experimental)
55-
* ``to_html``
56-
* ``to_gbq`` (experimental)
57-
* ``to_stata``
58-
* ``to_clipboard``
59-
* ``to_pickle``
49+
* :ref:`to_csv<io.store_in_csv>`
50+
* :ref:`to_excel<io.excel>`
51+
* :ref:`to_hdf<io.hdf5>`
52+
* :ref:`to_sql<io.sql>`
53+
* :ref:`to_json<io.json_writer>`
54+
* :ref:`to_msgpack<io.msgpack>` (experimental)
55+
* :ref:`to_html<io.html>`
56+
* :ref:`to_gbq<io.bigquery>` (experimental)
57+
* :ref:`to_stata<io.stata_writer>`
58+
* :ref:`to_clipboard<io.clipboard>`
59+
* :ref:`to_pickle<io.pickle>`
6060

6161
.. _io.read_csv_table:
6262

@@ -979,11 +979,11 @@ Specifying ``iterator=True`` will also return the ``TextFileReader`` object:
979979
os.remove('tmp.sv')
980980
os.remove('tmp2.sv')
981981
982+
.. _io.store_in_csv:
983+
982984
Writing to CSV format
983985
~~~~~~~~~~~~~~~~~~~~~
984986

985-
.. _io.store_in_csv:
986-
987987
The Series and DataFrame objects have an instance method ``to_csv`` which
988988
allows storing the contents of the object as a comma-separated-values file. The
989989
function takes a number of arguments. Only the first is required.
@@ -1032,13 +1032,14 @@ The Series object also has a ``to_string`` method, but with only the ``buf``,
10321032
``na_rep``, ``float_format`` arguments. There is also a ``length`` argument
10331033
which, if set to ``True``, will additionally output the length of the Series.
10341034

1035+
.. _io.json:
10351036

10361037
JSON
10371038
----
10381039

10391040
Read and write ``JSON`` format files and strings.
10401041

1041-
.. _io.json:
1042+
.. _io.json_writer:
10421043

10431044
Writing JSON
10441045
~~~~~~~~~~~~
@@ -1229,6 +1230,8 @@ which can be dealt with by specifying a simple ``default_handler``:
12291230
return obj.total_seconds()
12301231
dftd.to_json(default_handler=my_handler)
12311232
1233+
.. _io.json_reader:
1234+
12321235
Reading JSON
12331236
~~~~~~~~~~~~
12341237

@@ -1460,6 +1463,8 @@ into a flat table.
14601463
HTML
14611464
----
14621465

1466+
.. _io.read_html:
1467+
14631468
Reading HTML Content
14641469
~~~~~~~~~~~~~~~~~~~~~~
14651470

@@ -1469,8 +1474,6 @@ Reading HTML Content
14691474
<html-gotchas>` regarding the issues surrounding the
14701475
BeautifulSoup4/html5lib/lxml parsers.
14711476

1472-
.. _io.read_html:
1473-
14741477
.. versionadded:: 0.12.0
14751478

14761479
The top-level :func:`~pandas.io.html.read_html` function can accept an HTML
@@ -1617,11 +1620,11 @@ succeeds, the function will return*.
16171620
dfs = read_html(url, 'Metcalf Bank', index_col=0, flavor=['lxml', 'bs4'])
16181621
16191622
1623+
.. _io.html:
1624+
16201625
Writing to HTML files
16211626
~~~~~~~~~~~~~~~~~~~~~~
16221627

1623-
.. _io.html:
1624-
16251628
``DataFrame`` objects have an instance method ``to_html`` which renders the
16261629
contents of the ``DataFrame`` as an HTML table. The function arguments are as
16271630
in the method ``to_string`` described above.

doc/source/timeseries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ Time Deltas & Reductions
12471247

12481248
.. warning::
12491249

1250-
A numeric reduction operation for ``timedelta64[ns]`` will return a single-element ``Series`` of
1250+
A numeric reduction operation for ``timedelta64[ns]`` can return a single-element ``Series`` of
12511251
dtype ``timedelta64[ns]``.
12521252

12531253
You can do numeric reduction operations on timedeltas.

doc/source/v0.13.0.txt

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ API changes
5858
# and all methods take an inplace kwarg - but return None
5959
index.set_names(["bob", "cranberry"], inplace=True)
6060

61-
- **All** division with ``NDFrame`` - likes is now truedivision, regardless
62-
of the future import. You can use ``//`` and ``floordiv`` to do integer
63-
division.
61+
- **All** division with ``NDFrame`` objects is now *truedivision*, regardless
62+
of the future import. This means that operating on pandas objects will by default
63+
use *floating point* division, and return a floating point dtype.
64+
You can use ``//`` and ``floordiv`` to do integer division.
65+
66+
Integer division
6467

6568
.. code-block:: python
6669

@@ -71,8 +74,20 @@ API changes
7174
In [5]: arr / arr2
7275
Out[5]: array([0, 0, 1, 4])
7376

74-
In [6]: pd.Series(arr) / pd.Series(arr2) # no future import required
77+
In [6]: Series(arr) // Series(arr2)
7578
Out[6]:
79+
0 0
80+
1 0
81+
2 1
82+
3 4
83+
dtype: int64
84+
85+
True Division
86+
87+
.. code-block:: python
88+
89+
In [7]: pd.Series(arr) / pd.Series(arr2) # no future import required
90+
Out[7]:
7691
0 0.200000
7792
1 0.666667
7893
2 1.500000
@@ -146,6 +161,7 @@ These were announced changes in 0.12 or prior that are taking effect as of 0.13.
146161
- Remove deprecated ``set_printoptions/reset_printoptions`` (:issue:`3046`)
147162
- Remove deprecated ``_verbose_info`` (:issue:`3215`)
148163
- Remove deprecated ``read_clipboard/to_clipboard/ExcelFile/ExcelWriter`` from ``pandas.io.parsers`` (:issue:`3717`)
164+
These are available as functions in the main pandas namespace (e.g. ``pd.read_clipboard``)
149165
- default for ``tupleize_cols`` is now ``False`` for both ``to_csv`` and ``read_csv``. Fair warning in 0.12 (:issue:`3604`)
150166

151167
Deprecations
@@ -169,7 +185,7 @@ Indexing API Changes
169185
~~~~~~~~~~~~~~~~~~~~
170186

171187
Prior to 0.13, it was impossible to use a label indexer (``.loc/.ix``) to set a value that
172-
was not contained in the index of a particular axis. (:issue:`2578`). See more :ref:`the docs<indexing.basics.partial_setting>`
188+
was not contained in the index of a particular axis. (:issue:`2578`). See :ref:`the docs<indexing.basics.partial_setting>`
173189

174190
In the ``Series`` case this is effectively an appending operation
175191

@@ -420,7 +436,7 @@ Enhancements
420436
get_dummies([1, 2, np.nan], dummy_na=True)
421437

422438

423-
- ``timedelta64[ns]`` operations. See :ref:`the docs<timeseries.timedeltas_convert>` for the docs.
439+
- ``timedelta64[ns]`` operations. See :ref:`the docs<timeseries.timedeltas_convert>`.
424440

425441
.. warning::
426442

@@ -478,8 +494,7 @@ Enhancements
478494
td.fillna(0)
479495
td.fillna(timedelta(days=1,seconds=5))
480496

481-
You can do numeric reduction operations on timedeltas. Note that these will return
482-
a single-element Series.
497+
You can do numeric reduction operations on timedeltas.
483498

484499
.. ipython:: python
485500

@@ -584,7 +599,7 @@ Enhancements
584599
- ``tz_localize`` can infer a fall daylight savings transition based on the structure
585600
of the unlocalized data (:issue:`4230`), see :ref:`the docs<timeseries.timezone>`
586601

587-
- DatetimeIndex is now in the API documentation, see :ref:`the docs<api.datetimeindex>`
602+
- ``DatetimeIndex`` is now in the API documentation, see :ref:`the docs<api.datetimeindex>`
588603

589604
- :meth:`~pandas.io.json.json_normalize` is a new method to allow you to create a flat table
590605
from semi-structured JSON data. See :ref:`the docs<io.json_normalize>` (:issue:`1067`)
@@ -593,11 +608,14 @@ Enhancements
593608

594609
- Python csv parser now supports usecols (:issue:`4335`)
595610

596-
- DataFrame has a new ``interpolate`` method, similar to Series (:issue:`4434`, :issue:`1892`)
597-
- Added ``LastWeekOfMonth`` DateOffset (:issue:`4637`)
598-
- Added ``FY5253``, and ``FY5253Quarter`` DateOffsets (:issue:`4511`)
611+
- Frequencies gained several new offsets:
612+
613+
* ``LastWeekOfMonth`` (:issue:`4637`)
614+
* ``FY5253``, and ``FY5253Quarter`` (:issue:`4511`)
599615

600616

617+
- DataFrame has a new ``interpolate`` method, similar to Series (:issue:`4434`, :issue:`1892`)
618+
601619
.. ipython:: python
602620

603621
df = DataFrame({'A': [1, 2.1, np.nan, 4.7, 5.6, 6.8],
@@ -618,12 +636,10 @@ Enhancements
618636
ser = Series([1, 3, np.nan, np.nan, np.nan, 11])
619637
ser.interpolate(limit=2)
620638

621-
- Added ``wide_to_long`` panel data convenience function.
639+
- Added ``wide_to_long`` panel data convenience function. See :ref:`the docs<reshaping.melt>`.
622640

623641
.. ipython:: python
624642

625-
import pandas as pd
626-
import numpy as np
627643
np.random.seed(123)
628644
df = pd.DataFrame({"A1970" : {0 : "a", 1 : "b", 2 : "c"},
629645
"A1980" : {0 : "d", 1 : "e", 2 : "f"},
@@ -887,15 +903,8 @@ to unify methods and behaviors. Series formerly subclassed directly from
887903

888904
- Reindex called with no arguments will now return a copy of the input object
889905

890-
- Series now inherits from ``NDFrame`` rather than directly from ``ndarray``.
891-
There are several minor changes that affect the API.
892-
893-
- numpy functions that do not support the array interface will now
894-
return ``ndarrays`` rather than series, e.g. ``np.diff`` and ``np.ones_like``
895-
- ``Series(0.5)`` would previously return the scalar ``0.5``, this is no
896-
longer supported
897-
- ``TimeSeries`` is now an alias for ``Series``. the property ``is_time_series``
898-
can be used to distinguish (if desired)
906+
- ``TimeSeries`` is now an alias for ``Series``. the property ``is_time_series``
907+
can be used to distinguish (if desired)
899908

900909
- Refactor of Sparse objects to use BlockManager
901910

0 commit comments

Comments
 (0)