Skip to content

Commit 330e24d

Browse files
Merge remote-tracking branch 'upstream/master' into 33200-groupby-quantile
2 parents 7a5a77e + a84bfc0 commit 330e24d

File tree

192 files changed

+3685
-2835
lines changed

Some content is hidden

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

192 files changed

+3685
-2835
lines changed

asv_bench/benchmarks/io/parsers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
try:
44
from pandas._libs.tslibs.parsing import (
5-
_concat_date_cols,
5+
concat_date_cols,
66
_does_string_look_like_datetime,
77
)
88
except ImportError:
@@ -39,4 +39,4 @@ def setup(self, value, dim):
3939
)
4040

4141
def time_check_concat(self, value, dim):
42-
_concat_date_cols(self.object)
42+
concat_date_cols(self.object)

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-36-minimum_versions.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.6.1
@@ -19,12 +18,12 @@ dependencies:
1918
- jinja2=2.8
2019
- numba=0.46.0
2120
- numexpr=2.6.2
22-
- numpy=1.13.3
21+
- numpy=1.15.4
2322
- openpyxl=2.5.7
2423
- pytables=3.4.3
2524
- python-dateutil=2.7.3
2625
- pytz=2017.2
27-
- scipy=0.19.0
26+
- scipy=1.2
2827
- xlrd=1.1.0
2928
- xlsxwriter=0.9.8
3029
- xlwt=1.2.0

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"

ci/deps/azure-macos-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- matplotlib=2.2.3
2020
- nomkl
2121
- numexpr
22-
- numpy=1.14
22+
- numpy=1.15.4
2323
- openpyxl
2424
- pyarrow>=0.13.0
2525
- pytables

conda.recipe/meta.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ requirements:
2020
- cython
2121
- numpy
2222
- setuptools >=3.3
23-
- python-dateutil >=2.5.0
23+
- python-dateutil >=2.7.3
2424
- pytz
2525
run:
2626
- python {{ python }}
2727
- {{ pin_compatible('numpy') }}
28-
- python-dateutil >=2.5.0
28+
- python-dateutil >=2.7.3
2929
- pytz
3030

3131
test:

doc/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
intersphinx_mapping = {
411411
"dateutil": ("https://dateutil.readthedocs.io/en/latest/", None),
412412
"matplotlib": ("https://matplotlib.org/", None),
413-
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
413+
"numpy": ("https://numpy.org/doc/stable/", None),
414414
"pandas-gbq": ("https://pandas-gbq.readthedocs.io/en/latest/", None),
415415
"py": ("https://pylib.readthedocs.io/en/latest/", None),
416416
"python": ("https://docs.python.org/3/", None),

doc/source/getting_started/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Dependencies
220220
Package Minimum supported version
221221
================================================================ ==========================
222222
`setuptools <https://setuptools.readthedocs.io/en/latest/>`__ 24.2.0
223-
`NumPy <https://www.numpy.org>`__ 1.13.3
223+
`NumPy <https://www.numpy.org>`__ 1.15.4
224224
`python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ 2.7.3
225225
`pytz <https://pypi.org/project/pytz/>`__ 2017.2
226226
================================================================ ==========================

doc/source/reference/groupby.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ Function application
3636

3737
GroupBy.apply
3838
GroupBy.agg
39-
GroupBy.aggregate
40-
GroupBy.transform
39+
SeriesGroupBy.aggregate
40+
DataFrameGroupBy.aggregate
41+
SeriesGroupBy.transform
42+
DataFrameGroupBy.transform
4143
GroupBy.pipe
4244

4345
Computations / descriptive stats

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

0 commit comments

Comments
 (0)