Skip to content

Commit 1e4f8c1

Browse files
committed
DOC: minor io/whatsnew doc edits
1 parent 1a6b967 commit 1e4f8c1

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

doc/source/io.rst

+26-25
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ They can take a number of arguments:
123123
Because it has to essentially scan through the data again, this causes a
124124
significant performance hit so only use if necessary.
125125
- ``lineterminator`` : string (length 1), default ``None``, Character to break file into lines. Only valid with C parser
126-
- ``quotechar`` : string, The character to used to denote the start and end of a quoted item.
126+
- ``quotechar`` : string, The character to used to denote the start and end of a quoted item.
127127
Quoted items can include the delimiter and it will be ignored.
128-
- ``quoting`` : int,
128+
- ``quoting`` : int,
129129
Controls whether quotes should be recognized. Values are taken from `csv.QUOTE_*` values.
130130
Acceptable values are 0, 1, 2, and 3 for QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONE, and QUOTE_NONNUMERIC, respectively.
131131
- ``skipinitialspace`` : boolean, default ``False``, Skip spaces after delimiter
@@ -147,9 +147,9 @@ They can take a number of arguments:
147147
- ``verbose``: show number of NA values inserted in non-numeric columns
148148
- ``squeeze``: if True then output with only one column is turned into Series
149149
- ``error_bad_lines``: if False then any lines causing an error will be skipped :ref:`bad lines <io.bad_lines>`
150-
- ``usecols``: a subset of columns to return, results in much faster parsing
150+
- ``usecols``: a subset of columns to return, results in much faster parsing
151151
time and lower memory usage.
152-
- ``mangle_dupe_cols``: boolean, default True, then duplicate columns will be specified
152+
- ``mangle_dupe_cols``: boolean, default True, then duplicate columns will be specified
153153
as 'X.0'...'X.N', rather than 'X'...'X'
154154
- ``tupleize_cols``: boolean, default True, if False, convert a list of tuples
155155
to a multi-index of columns, otherwise, leave the column index as a list of tuples
@@ -783,8 +783,8 @@ to do as before:
783783
os.remove('foo.csv')
784784
785785
786-
Reading DataFrame objects with ``MultiIndex``
787-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
786+
Reading an index with a ``MultiIndex``
787+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
788788

789789
.. _io.csv_multiindex:
790790

@@ -795,7 +795,8 @@ Suppose you have data indexed by two columns:
795795
print open('data/mindex_ex.csv').read()
796796
797797
The ``index_col`` argument to ``read_csv`` and ``read_table`` can take a list of
798-
column numbers to turn multiple columns into a ``MultiIndex``:
798+
column numbers to turn multiple columns into a ``MultiIndex`` for the index of the
799+
returned object:
799800

800801
.. ipython:: python
801802
@@ -805,12 +806,12 @@ column numbers to turn multiple columns into a ``MultiIndex``:
805806
806807
.. _io.multi_index_columns:
807808

808-
Specifying a multi-index columns
809-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
809+
Reading columns with a ``MultiIndex``
810+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
810811

811812
By specifying list of row locations for the ``header`` argument, you
812-
can read in a multi-index for the columns. Specifying non-consecutive
813-
rows will skip the interveaing rows.
813+
can read in a ``MultiIndex`` for the columns. Specifying non-consecutive
814+
rows will skip the interveaning rows.
814815

815816
.. ipython:: python
816817
@@ -820,8 +821,8 @@ rows will skip the interveaing rows.
820821
print open('mi.csv').read()
821822
pd.read_csv('mi.csv',header=[0,1,2,3],index_col=[0,1],tupleize_cols=False)
822823
823-
Note: The default behavior in 0.12 remains unchanged (``tupleize_cols=True``),
824-
but starting with 0.12, the default *to* write and read multi-index columns will be in the new
824+
Note: The default behavior in 0.12 remains unchanged (``tupleize_cols=True``) from prior versions,
825+
but starting with 0.13, the default *to* write and read multi-index columns will be in the new
825826
format (``tupleize_cols=False``)
826827

827828
Note: If an ``index_col`` is not specified (e.g. you don't have an index, or wrote it
@@ -958,7 +959,7 @@ Read and write ``JSON`` format files.
958959

959960
Writing JSON
960961
~~~~~~~~~~~~
961-
962+
962963
A ``Series`` or ``DataFrame`` can be converted to a valid JSON string. Use ``to_json``
963964
with optional parameters:
964965

@@ -1100,7 +1101,7 @@ I like my string indicies
11001101
si.index
11011102
si.columns
11021103
json = si.to_json()
1103-
1104+
11041105
sij = pd.read_json(json,convert_axes=False)
11051106
sij
11061107
sij.index
@@ -1433,18 +1434,18 @@ And then import the data directly to a DataFrame by calling:
14331434
14341435
clipdf
14351436
1436-
The ``to_clipboard`` method can be used to write the contents of a DataFrame to
1437-
the clipboard. Following which you can paste the clipboard contents into other
1437+
The ``to_clipboard`` method can be used to write the contents of a DataFrame to
1438+
the clipboard. Following which you can paste the clipboard contents into other
14381439
applications (CTRL-V on many operating systems). Here we illustrate writing a
14391440
DataFrame into clipboard and reading it back.
14401441

14411442
.. ipython:: python
1442-
1443+
14431444
df=pd.DataFrame(randn(5,3))
14441445
df
14451446
df.to_clipboard()
14461447
pd.read_clipboard()
1447-
1448+
14481449
We can see that we got the same content back, which we had earlier written to the clipboard.
14491450

14501451
.. note::
@@ -1510,7 +1511,7 @@ advanced strategies
15101511
xls = ExcelFile('path_to_file.xls')
15111512
xls.parse('Sheet1', index_col=None, na_values=['NA'])
15121513
1513-
Replaced by
1514+
Replaced by
15141515

15151516
.. code-block:: python
15161517
@@ -2430,7 +2431,7 @@ Writing to STATA format
24302431
24312432
.. _io.stata_writer:
24322433
2433-
The method :func:`~pandas.core.frame.DataFrame.to_stata` will write a DataFrame
2434+
The method :func:`~pandas.core.frame.DataFrame.to_stata` will write a DataFrame
24342435
into a .dta file. The format version of this file is always the latest one, 115.
24352436
24362437
.. ipython:: python
@@ -2458,9 +2459,9 @@ converting them to a DataFrame which is returned:
24582459
24592460
Currently the ``index`` is retrieved as a column on read back.
24602461
2461-
The parameter ``convert_categoricals`` indicates wheter value labels should be
2462-
read and used to create a ``Categorical`` variable from them. Value labels can
2463-
also be retrieved by the function ``variable_labels``, which requires data to be
2462+
The parameter ``convert_categoricals`` indicates wheter value labels should be
2463+
read and used to create a ``Categorical`` variable from them. Value labels can
2464+
also be retrieved by the function ``variable_labels``, which requires data to be
24642465
called before (see ``pandas.io.stata.StataReader``).
24652466
24662467
The StataReader supports .dta Formats 104, 105, 108, 113-115.
@@ -2471,7 +2472,7 @@ Alternatively, the function :func:`~pandas.io.stata.read_stata` can be used
24712472
24722473
import os
24732474
os.remove('stata.dta')
2474-
2475+
24752476
Data Reader
24762477
-----------
24772478

doc/source/v0.12.0.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. _whatsnew_0120:
22

3-
v0.12.0 (June ??, 2013)
3+
v0.12.0 (July ??, 2013)
44
------------------------
55

6-
This is a minor release from 0.11.0 and includes several new features and
6+
This is a major release from 0.11.0 and includes several new features and
77
enhancements along with a large number of bug fixes.
88

99
Highlites include a consistent I/O API naming scheme, routines to read html,
@@ -207,19 +207,19 @@ I/O Enhancements
207207
accessable via ``read_json`` top-level function for reading,
208208
and ``to_json`` DataFrame method for writing, :ref:`See the docs<io.json>`
209209

210-
- Multi-index column support for reading and writing csv format files
210+
- ``MultiIndex`` column support for reading and writing csv format files
211211

212212
- The ``header`` option in ``read_csv`` now accepts a
213213
list of the rows from which to read the index.
214214

215215
- The option, ``tupleize_cols`` can now be specified in both ``to_csv`` and
216216
``read_csv``, to provide compatiblity for the pre 0.12 behavior of
217-
writing and reading multi-index columns via a list of tuples. The default in
217+
writing and reading ``MultIndex`` columns via a list of tuples. The default in
218218
0.12 is to write lists of tuples and *not* interpret list of tuples as a
219-
multi-index column.
219+
``MultiIndex`` column.
220220

221-
Note: The default behavior in 0.12 remains unchanged, but starting with 0.13,
222-
the default *to* write and read multi-index columns will be in the new
221+
Note: The default behavior in 0.12 remains unchanged from prior versions, but starting with 0.13,
222+
the default *to* write and read ``MultiIndex`` columns will be in the new
223223
format. (:issue:`3571`, :issue:`1651`, :issue:`3141`)
224224

225225
- If an ``index_col`` is not specified (e.g. you don't have an index, or wrote it

0 commit comments

Comments
 (0)