Skip to content

DOC: update multi-index term with MultiIndex #21382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/source/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ either match on the *index* or *columns* via the **axis** keyword:

df_orig = df

Furthermore you can align a level of a multi-indexed DataFrame with a Series.
Furthermore you can align a level of a MultiIndexed DataFrame with a Series.

.. ipython:: python

Expand Down Expand Up @@ -1034,7 +1034,7 @@ Passing a single function to ``.transform()`` with a ``Series`` will yield a sin
Transform with multiple functions
+++++++++++++++++++++++++++++++++

Passing multiple functions will yield a column multi-indexed DataFrame.
Passing multiple functions will yield a column MultiIndexed DataFrame.
The first level will be the original frame column names; the second level
will be the names of the transforming functions.

Expand All @@ -1060,7 +1060,7 @@ Passing a dict of functions will allow selective transforming per column.

tsdf.transform({'A': np.abs, 'B': lambda x: x+1})

Passing a dict of lists will generate a multi-indexed DataFrame with these
Passing a dict of lists will generate a MultiIndexed DataFrame with these
selective transforms.

.. ipython:: python
Expand Down Expand Up @@ -1889,12 +1889,12 @@ faster than sorting the entire Series and calling ``head(n)`` on the result.
df.nsmallest(5, ['a', 'c'])


.. _basics.multi-index_sorting:
.. _basics.multiindex_sorting:

Sorting by a multi-index column
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sorting by a MultiIndex column
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You must be explicit about sorting when the column is a multi-index, and fully specify
You must be explicit about sorting when the column is a MultiIndex, and fully specify
all levels to ``by``.

.. ipython:: python
Expand Down
2 changes: 1 addition & 1 deletion doc/source/contributing_docstring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ their use cases, if it is not too generic.
"""
Pivot a row index to columns.

When using a multi-index, a level can be pivoted so each value in
When using a MultiIndex, a level can be pivoted so each value in
the index becomes a column. This is especially useful when a subindex
is repeated for the main index, and data is easier to visualize as a
pivot table.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/dsintro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ From a list of dicts
From a dict of tuples
~~~~~~~~~~~~~~~~~~~~~

You can automatically create a multi-indexed frame by passing a tuples
You can automatically create a MultiIndexed frame by passing a tuples
dictionary.

.. ipython:: python
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ecosystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ widely used by institutions such as statistics offices, central banks,
and international organisations. pandaSDMX can expose datasets and related
structural metadata including data flows, code-lists,
and data structure definitions as pandas Series
or multi-indexed DataFrames.
or MultiIndexed DataFrames.

`fredapi <https://github.com/mortada/fredapi>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@ Read a URL and match a table that contains specific text:

Specify a header row (by default ``<th>`` or ``<td>`` elements located within a
``<thead>`` are used to form the column index, if multiple rows are contained within
``<thead>`` then a multi-index is created); if specified, the header row is taken
``<thead>`` then a MultiIndex is created); if specified, the header row is taken
from the data minus the parsed header elements (``<th>`` elements).

.. code-block:: python
Expand Down Expand Up @@ -3615,10 +3615,10 @@ defaults to `nan`.
# we have provided a minimum string column size
store.root.df_mixed.table

Storing Multi-Index DataFrames
++++++++++++++++++++++++++++++
Storing MultiIndex DataFrames
+++++++++++++++++++++++++++++

Storing multi-index ``DataFrames`` as tables is very similar to
Storing MultiIndex ``DataFrames`` as tables is very similar to
storing/selecting from homogeneous index ``DataFrames``.

.. ipython:: python
Expand Down
12 changes: 6 additions & 6 deletions doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1085,12 +1085,12 @@ As you can see, this drops any rows where there was no match.

.. _merging.join_on_mi:

Joining a single Index to a Multi-index
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joining a single Index to a MultiIndex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can join a singly-indexed ``DataFrame`` with a level of a multi-indexed ``DataFrame``.
You can join a singly-indexed ``DataFrame`` with a level of a MultiIndexed ``DataFrame``.
The level will match on the name of the index of the singly-indexed frame against
a level name of the multi-indexed frame.
a level name of the MultiIndexed frame.

.. ipython:: python

Expand Down Expand Up @@ -1130,8 +1130,8 @@ This is equivalent but less verbose and more memory efficient / faster than this
labels=['left', 'right'], vertical=False);
plt.close('all');

Joining with two multi-indexes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joining with two MultiIndexes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is not implemented via ``join`` at-the-moment, however it can be done using
the following code.
Expand Down
48 changes: 24 additions & 24 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ Highlights include:
- SQL interfaces updated to use ``sqlalchemy``, see :ref:`here<whatsnew_0140.sql>`.
- Display interface changes, see :ref:`here<whatsnew_0140.display>`
- MultiIndexing using Slicers, see :ref:`here<whatsnew_0140.slicers>`.
- Ability to join a singly-indexed DataFrame with a multi-indexed DataFrame, see :ref:`here <merging.join_on_mi>`
- Ability to join a singly-indexed DataFrame with a MultiIndexed DataFrame, see :ref:`here <merging.join_on_mi>`
- More consistency in groupby results and more flexible groupby specifications, see :ref:`here<whatsnew_0140.groupby>`
- Holiday calendars are now supported in ``CustomBusinessDay``, see :ref:`here <timeseries.holiday>`
- Several improvements in plotting functions, including: hexbin, area and pie plots, see :ref:`here<whatsnew_0140.plotting>`.
Expand Down Expand Up @@ -2384,8 +2384,8 @@ Bug Fixes
- Bug in merging ``timedelta`` dtypes (:issue:`5695`)
- Bug in plotting.scatter_matrix function. Wrong alignment among diagonal
and off-diagonal plots, see (:issue:`5497`).
- Regression in Series with a multi-index via ix (:issue:`6018`)
- Bug in Series.xs with a multi-index (:issue:`6018`)
- Regression in Series with a MultiIndex via ix (:issue:`6018`)
- Bug in Series.xs with a MultiIndex (:issue:`6018`)
- Bug in Series construction of mixed type with datelike and an integer (which should result in
object type and not automatic conversion) (:issue:`6028`)
- Possible segfault when chained indexing with an object array under NumPy 1.7.1 (:issue:`6026`, :issue:`6056`)
Expand All @@ -2409,10 +2409,10 @@ Bug Fixes
- Fixed a bug in ``query``/``eval`` during lexicographic string comparisons (:issue:`6155`).
- Fixed a bug in ``query`` where the index of a single-element ``Series`` was
being thrown away (:issue:`6148`).
- Bug in ``HDFStore`` on appending a dataframe with multi-indexed columns to
- Bug in ``HDFStore`` on appending a dataframe with MultiIndexed columns to
an existing table (:issue:`6167`)
- Consistency with dtypes in setting an empty DataFrame (:issue:`6171`)
- Bug in selecting on a multi-index ``HDFStore`` even in the presence of under
- Bug in selecting on a MultiIndex ``HDFStore`` even in the presence of under
specified column spec (:issue:`6169`)
- Bug in ``nanops.var`` with ``ddof=1`` and 1 elements would sometimes return ``inf``
rather than ``nan`` on some platforms (:issue:`6136`)
Expand Down Expand Up @@ -2659,8 +2659,8 @@ API Changes
- the ``format`` keyword now replaces the ``table`` keyword; allowed values
are ``fixed(f)|table(t)`` the ``Storer`` format has been renamed to
``Fixed``
- a column multi-index will be recreated properly (:issue:`4710`); raise on
trying to use a multi-index with data_columns on the same axis
- a column MultiIndex will be recreated properly (:issue:`4710`); raise on
trying to use a MultiIndex with data_columns on the same axis
- ``select_as_coordinates`` will now return an ``Int64Index`` of the
resultant selection set
- support ``timedelta64[ns]`` as a serialization type (:issue:`3577`)
Expand Down Expand Up @@ -2932,7 +2932,7 @@ Bug Fixes
- A zero length series written in Fixed format not deserializing properly.
(:issue:`4708`)
- Fixed decoding perf issue on pyt3 (:issue:`5441`)
- Validate levels in a multi-index before storing (:issue:`5527`)
- Validate levels in a MultiIndex before storing (:issue:`5527`)
- Correctly handle ``data_columns`` with a Panel (:issue:`5717`)
- Fixed bug in tslib.tz_convert(vals, tz1, tz2): it could raise IndexError
exception while trying to access trans[pos + 1] (:issue:`4496`)
Expand Down Expand Up @@ -2995,7 +2995,7 @@ Bug Fixes
alignment (:issue:`3777`)
- frozenset objects now raise in the ``Series`` constructor (:issue:`4482`,
:issue:`4480`)
- Fixed issue with sorting a duplicate multi-index that has multiple dtypes
- Fixed issue with sorting a duplicate MultiIndex that has multiple dtypes
(:issue:`4516`)
- Fixed bug in ``DataFrame.set_values`` which was causing name attributes to
be lost when expanding the index. (:issue:`3742`, :issue:`4039`)
Expand Down Expand Up @@ -3042,11 +3042,11 @@ Bug Fixes
(:issue:`4328`)
- Bug with Series indexing not raising an error when the right-hand-side has
an incorrect length (:issue:`2702`)
- Bug in multi-indexing with a partial string selection as one part of a
- Bug in MultiIndexing with a partial string selection as one part of a
MultIndex (:issue:`4758`)
- Bug with reindexing on the index with a non-unique index will now raise
``ValueError`` (:issue:`4746`)
- Bug in setting with ``loc/ix`` a single indexer with a multi-index axis and
- Bug in setting with ``loc/ix`` a single indexer with a MultiIndex axis and
a NumPy array, related to (:issue:`3777`)
- Bug in concatenation with duplicate columns across dtypes not merging with
axis=0 (:issue:`4771`, :issue:`4975`)
Expand Down Expand Up @@ -3117,7 +3117,7 @@ Bug Fixes
- Make sure series-series boolean comparisons are label based (:issue:`4947`)
- Bug in multi-level indexing with a Timestamp partial indexer
(:issue:`4294`)
- Tests/fix for multi-index construction of an all-nan frame (:issue:`4078`)
- Tests/fix for MultiIndex construction of an all-nan frame (:issue:`4078`)
- Fixed a bug where :func:`~pandas.read_html` wasn't correctly inferring
values of tables with commas (:issue:`5029`)
- Fixed a bug where :func:`~pandas.read_html` wasn't providing a stable
Expand Down Expand Up @@ -3174,7 +3174,7 @@ Bug Fixes
- Fixed segfault in C parser caused by passing more names than columns in
the file. (:issue:`5156`)
- Fix ``Series.isin`` with date/time-like dtypes (:issue:`5021`)
- C and Python Parser can now handle the more common multi-index column
- C and Python Parser can now handle the more common MultiIndex column
format which doesn't have a row for index names (:issue:`4702`)
- Bug when trying to use an out-of-bounds date as an object dtype
(:issue:`5312`)
Expand All @@ -3199,7 +3199,7 @@ Bug Fixes
- performance improvements in ``isnull`` on larger size pandas objects
- Fixed various setitem with 1d ndarray that does not have a matching
length to the indexer (:issue:`5508`)
- Bug in getitem with a multi-index and ``iloc`` (:issue:`5528`)
- Bug in getitem with a MultiIndex and ``iloc`` (:issue:`5528`)
- Bug in delitem on a Series (:issue:`5542`)
- Bug fix in apply when using custom function and objects are not mutated (:issue:`5545`)
- Bug in selecting from a non-unique index with ``loc`` (:issue:`5553`)
Expand All @@ -3208,7 +3208,7 @@ Bug Fixes
- Bug in repeated indexing of object with resultant non-unique index (:issue:`5678`)
- Bug in fillna with Series and a passed series/dict (:issue:`5703`)
- Bug in groupby transform with a datetime-like grouper (:issue:`5712`)
- Bug in multi-index selection in PY3 when using certain keys (:issue:`5725`)
- Bug in MultiIndex selection in PY3 when using certain keys (:issue:`5725`)
- Row-wise concat of differing dtypes failing in certain cases (:issue:`5754`)

pandas 0.12.0
Expand All @@ -3229,14 +3229,14 @@ New Features
- Added module for reading and writing Stata files: pandas.io.stata (:issue:`1512`)
includes ``to_stata`` DataFrame method, and a ``read_stata`` top-level reader
- Added support for writing in ``to_csv`` and reading in ``read_csv``,
multi-index columns. The ``header`` option in ``read_csv`` now accepts a
MultiIndex columns. The ``header`` option in ``read_csv`` now accepts a
list of the rows from which to read the index. Added the option,
``tupleize_cols`` to provide compatibility for the pre 0.12 behavior of
writing and reading multi-index columns via a list of tuples. The default in
writing and reading MultiIndex columns via a list of tuples. The default in
0.12 is to write lists of tuples and *not* interpret list of tuples as a
multi-index column.
MultiIndex column.
Note: The default value will change in 0.12 to make the default *to* write and
read multi-index columns in the new format. (:issue:`3571`, :issue:`1651`, :issue:`3141`)
read MultiIndex columns in the new format. (:issue:`3571`, :issue:`1651`, :issue:`3141`)
- Add iterator to ``Series.str`` (:issue:`3638`)
- ``pd.set_option()`` now allows N option, value pairs (:issue:`3667`).
- Added keyword parameters for different types of scatter_matrix subplots
Expand Down Expand Up @@ -3447,7 +3447,7 @@ Bug Fixes
- Fixed bug with ``Panel.transpose`` argument aliases (:issue:`3556`)
- Fixed platform bug in ``PeriodIndex.take`` (:issue:`3579`)
- Fixed bud in incorrect conversion of datetime64[ns] in ``combine_first`` (:issue:`3593`)
- Fixed bug in reset_index with ``NaN`` in a multi-index (:issue:`3586`)
- Fixed bug in reset_index with ``NaN`` in a MultiIndex (:issue:`3586`)
- ``fillna`` methods now raise a ``TypeError`` when the ``value`` parameter
is a ``list`` or ``tuple``.
- Fixed bug where a time-series was being selected in preference to an actual column name
Expand Down Expand Up @@ -3480,7 +3480,7 @@ Bug Fixes
their first argument (:issue:`3702`)
- Fix file tokenization error with \r delimiter and quoted fields (:issue:`3453`)
- Groupby transform with item-by-item not upcasting correctly (:issue:`3740`)
- Incorrectly read a HDFStore multi-index Frame with a column specification (:issue:`3748`)
- Incorrectly read a HDFStore MultiIndex Frame with a column specification (:issue:`3748`)
- ``read_html`` now correctly skips tests (:issue:`3741`)
- PandasObjects raise TypeError when trying to hash (:issue:`3882`)
- Fix incorrect arguments passed to concat that are not list-like (e.g. concat(df1,df2)) (:issue:`3481`)
Expand All @@ -3497,7 +3497,7 @@ Bug Fixes
- csv parsers would loop infinitely if ``iterator=True`` but no ``chunksize`` was
specified (:issue:`3967`), Python parser failing with ``chunksize=1``
- Fix index name not propagating when using ``shift``
- Fixed dropna=False being ignored with multi-index stack (:issue:`3997`)
- Fixed dropna=False being ignored with MultiIndex stack (:issue:`3997`)
- Fixed flattening of columns when renaming MultiIndex columns DataFrame (:issue:`4004`)
- Fix ``Series.clip`` for datetime series. NA/NaN threshold values will now throw ValueError (:issue:`3996`)
- Fixed insertion issue into DataFrame, after rename (:issue:`4032`)
Expand All @@ -3521,7 +3521,7 @@ Bug Fixes
iterated over when regex=False (:issue:`4115`)
- Fixed bug in ``convert_objects(convert_numeric=True)`` where a mixed numeric and
object Series/Frame was not converting properly (:issue:`4119`)
- Fixed bugs in multi-index selection with column multi-index and duplicates
- Fixed bugs in MultiIndex selection with column MultiIndex and duplicates
(:issue:`4145`, :issue:`4146`)
- Fixed bug in the parsing of microseconds when using the ``format``
argument in ``to_datetime`` (:issue:`4152`)
Expand Down Expand Up @@ -3830,7 +3830,7 @@ Improvements to existing features

- ``HDFStore``

- enables storing of multi-index dataframes (closes :issue:`1277`)
- enables storing of MultiIndex dataframes (closes :issue:`1277`)
- support data column indexing and selection, via ``data_columns`` keyword
in append
- support write chunking to reduce memory footprint, via ``chunksize``
Expand Down
4 changes: 4 additions & 0 deletions doc/source/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ ga
fe
reindexed
automagic
closedness
ae
arbitrarly
losslessly
Histogramming
histogramming
concat
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.10.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Updated PyTables Support
df1.get_dtype_counts()

- performance improvements on table writing
- support for arbitrary indexed dimensions
- support for arbitrarly indexed dimensions
- ``SparseSeries`` now has a ``density`` property (:issue:`2384`)
- enable ``Series.str.strip/lstrip/rstrip`` methods to take an input argument
to strip arbitrary characters (:issue:`2411`)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.10.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ columns, this is equivalent to passing a

store.select('df',columns = ['A','B'])

``HDFStore`` now serializes multi-index dataframes when appending tables.
``HDFStore`` now serializes MultiIndex dataframes when appending tables.

.. ipython:: python

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.12.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a major release from 0.11.0 and includes several new features and
enhancements along with a large number of bug fixes.

Highlights include a consistent I/O API naming scheme, routines to read html,
write multi-indexes to csv files, read & write STATA data files, read & write JSON format
write MultiIndexes to csv files, read & write STATA data files, read & write JSON format
files, Python 3 support for ``HDFStore``, filtering of groupby expressions via ``filter``, and a
revamped ``replace`` routine that accepts regular expressions.

Expand Down
Loading