Skip to content

Commit cf8c847

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into as_index_false
2 parents c681254 + 6388370 commit cf8c847

File tree

104 files changed

+1289
-1217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1289
-1217
lines changed

ci/code_checks.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ fi
353353
### DOCSTRINGS ###
354354
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
355355

356-
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA02, SA03, SA05)' ; echo $MSG
357-
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA02,SA03,SA05
356+
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA02, SA03)' ; echo $MSG
357+
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA02,SA03
358358
RET=$(($RET + $?)) ; echo $MSG "DONE"
359359

360360
MSG='Validate correct capitalization among titles in documentation' ; echo $MSG

ci/deps/azure-37-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- pytz
1515
- pip
1616
- pip:
17-
- cython>=0.29.16
17+
- cython==0.29.16 # GH#34014
1818
- "git+git://github.com/dateutil/dateutil.git"
1919
- "-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
2020
- "--pre"

doc/source/whatsnew/v0.18.0.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0180:
22

3-
v0.18.0 (March 13, 2016)
4-
------------------------
3+
Version 0.18.0 (March 13, 2016)
4+
-------------------------------
55

66
{{ header }}
77

@@ -145,7 +145,7 @@ This continues to work as before for function or dict-like values.
145145

146146
.. _whatsnew_0180.enhancements.rangeindex:
147147

148-
Range index
148+
Range Index
149149
^^^^^^^^^^^
150150

151151
A ``RangeIndex`` has been added to the ``Int64Index`` sub-classes to support a memory saving alternative for common use cases. This has a similar implementation to the python ``range`` object (``xrange`` in python 2), in that it only stores the start, stop, and step values for the index. It will transparently interact with the user API, converting to ``Int64Index`` if needed.
@@ -456,8 +456,8 @@ New behavior:
456456
457457
.. _whatsnew_0180.enhancements.xarray:
458458

459-
to_xarray
460-
^^^^^^^^^
459+
Method to_xarray
460+
^^^^^^^^^^^^^^^^
461461

462462
In a future version of pandas, we will be deprecating ``Panel`` and other > 2 ndim objects. In order to provide for continuity,
463463
all ``NDFrame`` objects have gained the ``.to_xarray()`` method in order to convert to ``xarray`` objects, which has

doc/source/whatsnew/v0.18.1.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0181:
22

3-
v0.18.1 (May 3, 2016)
4-
---------------------
3+
Version 0.18.1 (May 3, 2016)
4+
----------------------------
55

66
{{ header }}
77

@@ -61,8 +61,8 @@ Tuesday after MLK Day (Monday is skipped because it's a holiday)
6161
6262
.. _whatsnew_0181.deferred_ops:
6363

64-
``.groupby(..)`` syntax with window and resample operations
65-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
Method ``.groupby(..)`` syntax with window and resample operations
65+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6666

6767
``.groupby(...)`` has been enhanced to provide convenient syntax when working with ``.rolling(..)``, ``.expanding(..)`` and ``.resample(..)`` per group, see (:issue:`12486`, :issue:`12738`).
6868

@@ -111,7 +111,7 @@ Now you can do:
111111
.. _whatsnew_0181.enhancements.method_chain:
112112

113113
Method chaining improvements
114-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115115

116116
The following methods / indexers now accept a ``callable``. It is intended to make
117117
these more useful in method chains, see the :ref:`documentation <indexing.callable>`.
@@ -121,8 +121,8 @@ these more useful in method chains, see the :ref:`documentation <indexing.callab
121121
- ``.loc[]``, ``iloc[]`` and ``.ix[]``
122122
- ``[]`` indexing
123123

124-
``.where()`` and ``.mask()``
125-
""""""""""""""""""""""""""""
124+
Methods ``.where()`` and ``.mask()``
125+
""""""""""""""""""""""""""""""""""""
126126

127127
These can accept a callable for the condition and ``other``
128128
arguments.
@@ -134,8 +134,8 @@ arguments.
134134
'C': [7, 8, 9]})
135135
df.where(lambda x: x > 4, lambda x: x + 10)
136136
137-
``.loc[]``, ``.iloc[]``, ``.ix[]``
138-
""""""""""""""""""""""""""""""""""
137+
Methods ``.loc[]``, ``.iloc[]``, ``.ix[]``
138+
""""""""""""""""""""""""""""""""""""""""""
139139

140140
These can accept a callable, and a tuple of callable as a slicer. The callable
141141
can return a valid boolean indexer or anything which is valid for these indexer's input.
@@ -148,8 +148,8 @@ can return a valid boolean indexer or anything which is valid for these indexer'
148148
# callable returns list of labels
149149
df.loc[lambda x: [1, 2], lambda x: ['A', 'B']]
150150
151-
``[]`` indexing
152-
"""""""""""""""
151+
Indexing with``[]``
152+
"""""""""""""""""""
153153

154154
Finally, you can use a callable in ``[]`` indexing of Series, DataFrame and Panel.
155155
The callable must return a valid input for ``[]`` indexing depending on its
@@ -171,7 +171,7 @@ without using temporary variable.
171171
172172
.. _whatsnew_0181.partial_string_indexing:
173173

174-
Partial string indexing on ``DateTimeIndex`` when part of a ``MultiIndex``
174+
Partial string indexing on ``DatetimeIndex`` when part of a ``MultiIndex``
175175
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
176176

177177
Partial string indexing now matches on ``DateTimeIndex`` when part of a ``MultiIndex`` (:issue:`10331`)
@@ -306,8 +306,8 @@ API changes
306306

307307
.. _whatsnew_0181.api.groubynth:
308308

309-
``.groupby(..).nth()`` changes
310-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
309+
Method ``.groupby(..).nth()`` changes
310+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311311

312312
The index in ``.groupby(..).nth()`` output is now more consistent when the ``as_index`` argument is passed (:issue:`11039`):
313313

@@ -414,7 +414,7 @@ New behaviour:
414414
415415
.. _whatsnew_0181.apply_resample:
416416

417-
Using ``.apply`` on groupby resampling
417+
Using ``.apply`` on GroupBy resampling
418418
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
419419

420420
Using ``apply`` on resampling groupby operations (using a ``pd.TimeGrouper``) now has the same output types as similar ``apply`` calls on other groupby operations. (:issue:`11742`).
@@ -513,8 +513,8 @@ In addition to this error change, several others have been made as well:
513513

514514
.. _whatsnew_0181.api.to_datetime:
515515

516-
``to_datetime`` error changes
517-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
516+
Method ``to_datetime`` error changes
517+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
518518

519519
Bugs in ``pd.to_datetime()`` when passing a ``unit`` with convertible entries and ``errors='coerce'`` or non-convertible with ``errors='ignore'``. Furthermore, an ``OutOfBoundsDateime`` exception will be raised when an out-of-range value is encountered for that unit when ``errors='raise'``. (:issue:`11758`, :issue:`13052`, :issue:`13059`)
520520

doc/source/whatsnew/v0.19.0.rst

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

3-
v0.19.0 (October 2, 2016)
4-
-------------------------
3+
Version 0.19.0 (October 2, 2016)
4+
--------------------------------
55

66
{{ header }}
77

@@ -37,8 +37,8 @@ New features
3737

3838
.. _whatsnew_0190.enhancements.asof_merge:
3939

40-
``merge_asof`` for asof-style time-series joining
41-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
Function ``merge_asof`` for asof-style time-series joining
41+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

4343
A long-time requested feature has been added through the :func:`merge_asof` function, to
4444
support asof style joining of time-series (:issue:`1870`, :issue:`13695`, :issue:`13709`, :issue:`13902`). Full documentation is
@@ -127,8 +127,8 @@ passed DataFrame (``trades`` in this case), with the fields of the ``quotes`` me
127127

128128
.. _whatsnew_0190.enhancements.rolling_ts:
129129

130-
``.rolling()`` is now time-series aware
131-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130+
Method ``.rolling()`` is now time-series aware
131+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132132

133133
``.rolling()`` objects are now time-series aware and can accept a time-series offset (or convertible) for the ``window`` argument (:issue:`13327`, :issue:`12995`).
134134
See the full documentation :ref:`here <stats.moments.ts>`.
@@ -186,8 +186,8 @@ default of the index) in a DataFrame.
186186
187187
.. _whatsnew_0190.enhancements.read_csv_dupe_col_names_support:
188188

189-
``read_csv`` has improved support for duplicate column names
190-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189+
Method ``read_csv`` has improved support for duplicate column names
190+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191191

192192
.. ipython:: python
193193
:suppress:
@@ -225,8 +225,8 @@ contained the values ``[0, 3]``.
225225
226226
.. _whatsnew_0190.enhancements.read_csv_categorical:
227227

228-
``read_csv`` supports parsing ``Categorical`` directly
229-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228+
Method ``read_csv`` supports parsing ``Categorical`` directly
229+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230230

231231
The :func:`read_csv` function now supports parsing a ``Categorical`` column when
232232
specified as a dtype (:issue:`10153`). Depending on the structure of the data,
@@ -394,8 +394,8 @@ After upgrading pandas, you may see *new* ``RuntimeWarnings`` being issued from
394394

395395
.. _whatsnew_0190.get_dummies_dtypes:
396396

397-
``get_dummies`` now returns integer dtypes
398-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
397+
Method ``get_dummies`` now returns integer dtypes
398+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
399399

400400
The ``pd.get_dummies`` function now returns dummy-encoded columns as small integers, rather than floats (:issue:`8725`). This should provide an improved memory footprint.
401401

@@ -731,8 +731,8 @@ A ``Series`` will now correctly promote its dtype for assignment with incompat v
731731
732732
.. _whatsnew_0190.api.to_datetime_coerce:
733733

734-
``.to_datetime()`` changes
735-
^^^^^^^^^^^^^^^^^^^^^^^^^^
734+
Function ``.to_datetime()`` changes
735+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
736736

737737
Previously if ``.to_datetime()`` encountered mixed integers/floats and strings, but no datetimes with ``errors='coerce'`` it would convert all to ``NaT``.
738738

@@ -809,8 +809,8 @@ resulting dtype will be upcast, which is unchanged from previous.
809809
810810
.. _whatsnew_0190.api.describe:
811811

812-
``.describe()`` changes
813-
^^^^^^^^^^^^^^^^^^^^^^^
812+
Method ``.describe()`` changes
813+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
814814

815815
Percentile identifiers in the index of a ``.describe()`` output will now be rounded to the least precision that keeps them distinct (:issue:`13104`)
816816

@@ -863,8 +863,8 @@ Furthermore:
863863
``Period`` changes
864864
^^^^^^^^^^^^^^^^^^
865865

866-
``PeriodIndex`` now has ``period`` dtype
867-
""""""""""""""""""""""""""""""""""""""""
866+
The ``PeriodIndex`` now has ``period`` dtype
867+
""""""""""""""""""""""""""""""""""""""""""""
868868

869869
``PeriodIndex`` now has its own ``period`` dtype. The ``period`` dtype is a
870870
pandas extension dtype like ``category`` or the :ref:`timezone aware dtype <timeseries.timezone_series>` (``datetime64[ns, tz]``) (:issue:`13941`).
@@ -1151,8 +1151,8 @@ As a consequence, ``groupby`` and ``set_index`` also preserve categorical dtypes
11511151
11521152
.. _whatsnew_0190.api.autogenerated_chunksize_index:
11531153

1154-
``read_csv`` will progressively enumerate chunks
1155-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1154+
Function ``read_csv`` will progressively enumerate chunks
1155+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11561156

11571157
When :func:`read_csv` is called with ``chunksize=n`` and without specifying an index,
11581158
each chunk used to have an independently generated index from ``0`` to ``n-1``.
@@ -1190,8 +1190,8 @@ Sparse changes
11901190

11911191
These changes allow pandas to handle sparse data with more dtypes, and for work to make a smoother experience with data handling.
11921192

1193-
``int64`` and ``bool`` support enhancements
1194-
"""""""""""""""""""""""""""""""""""""""""""
1193+
Types ``int64`` and ``bool`` support enhancements
1194+
"""""""""""""""""""""""""""""""""""""""""""""""""
11951195

11961196
Sparse data structures now gained enhanced support of ``int64`` and ``bool`` ``dtype`` (:issue:`667`, :issue:`13849`).
11971197

doc/source/whatsnew/v0.19.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0191:
22

3-
v0.19.1 (November 3, 2016)
4-
--------------------------
3+
Version 0.19.1 (November 3, 2016)
4+
---------------------------------
55

66
{{ header }}
77

doc/source/whatsnew/v0.19.2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0192:
22

3-
v0.19.2 (December 24, 2016)
4-
---------------------------
3+
Version 0.19.2 (December 24, 2016)
4+
----------------------------------
55

66
{{ header }}
77

doc/source/whatsnew/v0.20.0.rst

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0200:
22

3-
v0.20.1 (May 5, 2017)
4-
---------------------
3+
Version 0.20.1 (May 5, 2017)
4+
----------------------------
55

66
{{ header }}
77

@@ -47,8 +47,8 @@ New features
4747

4848
.. _whatsnew_0200.enhancements.agg:
4949

50-
``agg`` API for DataFrame/Series
51-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
Method ``agg`` API for DataFrame/Series
51+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5252

5353
Series & DataFrame have been enhanced to support the aggregation API. This is a familiar API
5454
from groupby, window operations, and resampling. This allows aggregation operations in a concise way
@@ -110,8 +110,8 @@ aggregations. This is similar to how groupby ``.agg()`` works. (:issue:`15015`)
110110
111111
.. _whatsnew_0200.enhancements.dataio_dtype:
112112

113-
``dtype`` keyword for data IO
114-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113+
Keyword argument ``dtype`` for data IO
114+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115115

116116
The ``'python'`` engine for :func:`read_csv`, as well as the :func:`read_fwf` function for parsing
117117
fixed-width text files and :func:`read_excel` for parsing Excel files, now accept the ``dtype`` keyword argument for specifying the types of specific columns (:issue:`14295`). See the :ref:`io docs <io.dtypes>` for more information.
@@ -129,8 +129,8 @@ fixed-width text files and :func:`read_excel` for parsing Excel files, now accep
129129
130130
.. _whatsnew_0120.enhancements.datetime_origin:
131131

132-
``.to_datetime()`` has gained an ``origin`` parameter
133-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132+
Method ``.to_datetime()`` has gained an ``origin`` parameter
133+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134134

135135
:func:`to_datetime` has gained a new parameter, ``origin``, to define a reference date
136136
from where to compute the resulting timestamps when parsing numerical values with a specific ``unit`` specified. (:issue:`11276`, :issue:`11745`)
@@ -151,7 +151,7 @@ commonly called 'unix epoch' or POSIX time. This was the previous default, so th
151151
152152
.. _whatsnew_0200.enhancements.groupby_access:
153153

154-
Groupby enhancements
154+
GroupBy enhancements
155155
^^^^^^^^^^^^^^^^^^^^
156156

157157
Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now reference either column names or index level names. Previously, only column names could be referenced. This allows to easily group by a column and index level at the same time. (:issue:`5677`)
@@ -197,8 +197,8 @@ support for bz2 compression in the python 2 C-engine improved (:issue:`14874`).
197197
198198
.. _whatsnew_0200.enhancements.pickle_compression:
199199

200-
Pickle file I/O now supports compression
201-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200+
Pickle file IO now supports compression
201+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202202

203203
:func:`read_pickle`, :meth:`DataFrame.to_pickle` and :meth:`Series.to_pickle`
204204
can now read from and write to compressed pickle files. Compression methods
@@ -356,7 +356,7 @@ To convert a ``SparseDataFrame`` back to sparse SciPy matrix in COO format, you
356356
357357
.. _whatsnew_0200.enhancements.style_excel:
358358

359-
Excel output for styled dataframes
359+
Excel output for styled DataFrames
360360
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361361

362362
Experimental support has been added to export ``DataFrame.style`` formats to Excel using the ``openpyxl`` engine. (:issue:`15530`)
@@ -928,7 +928,7 @@ New behavior:
928928
929929
.. _whatsnew_0200.api_breaking.groupby_describe:
930930

931-
Groupby describe formatting
931+
GroupBy describe formatting
932932
^^^^^^^^^^^^^^^^^^^^^^^^^^^
933933

934934
The output formatting of ``groupby.describe()`` now labels the ``describe()`` metrics in the columns instead of the index.
@@ -1670,8 +1670,8 @@ Indexing
16701670
- Bug in in ``pd.concat()`` when combining objects with a ``CategoricalIndex`` (:issue:`16111`)
16711671
- Bug in indexing with a scalar and a ``CategoricalIndex`` (:issue:`16123`)
16721672

1673-
I/O
1674-
^^^
1673+
IO
1674+
^^
16751675

16761676
- Bug in ``pd.to_numeric()`` in which float and unsigned integer elements were being improperly casted (:issue:`14941`, :issue:`15005`)
16771677
- Bug in ``pd.read_fwf()`` where the skiprows parameter was not being respected during column width inference (:issue:`11256`)
@@ -1712,7 +1712,7 @@ Plotting
17121712
- Bug in the date and time converters pandas registers with matplotlib not handling multiple dimensions (:issue:`16026`)
17131713
- Bug in ``pd.scatter_matrix()`` could accept either ``color`` or ``c``, but not both (:issue:`14855`)
17141714

1715-
Groupby/resample/rolling
1715+
GroupBy/resample/rolling
17161716
^^^^^^^^^^^^^^^^^^^^^^^^
17171717

17181718
- Bug in ``.groupby(..).resample()`` when passed the ``on=`` kwarg. (:issue:`15021`)

0 commit comments

Comments
 (0)