Skip to content

Commit f6314b0

Browse files
committed
Merge remote-tracking branch 'upstream/master' into flake8_whatsnew21
* upstream/master: pct change bug issue 21200 (pandas-dev#21235) DOC: Fix summaries not ending with a period (pandas-dev#24190) DOC: Add back currentmodule to api.rst (pandas-dev#24232) DOC: Fixed implicit imports for whatsnew (v >= version 20.0) (pandas-dev#24199) remove enum import for PY2 compat, xref pandas-dev#22802 (pandas-dev#24170) CI: Simplify Azure Pipelines configuration files (pandas-dev#23111) REF/TST: Add more pytest idiom to indexing/multiindex/test_getitem.py (pandas-dev#24053)
2 parents 02f5844 + 9ea2877 commit f6314b0

23 files changed

+468
-553
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
22
jobs:
3-
# Mac and Linux could potentially use the same template
4-
# except it isn't clear how to use a different build matrix
5-
# for each, so for now they are separate
6-
- template: ci/azure/macos.yml
3+
# Mac and Linux use the same template
4+
- template: ci/azure/posix.yml
75
parameters:
86
name: macOS
97
vmImage: xcode9-macos10.13
10-
- template: ci/azure/linux.yml
8+
- template: ci/azure/posix.yml
119
parameters:
1210
name: Linux
1311
vmImage: ubuntu-16.04
1412

15-
# Windows Python 2.7 needs VC 9.0 installed, and not sure
16-
# how to make that a conditional task, so for now these are
17-
# separate templates as well
13+
# Windows Python 2.7 needs VC 9.0 installed, handled in the template
1814
- template: ci/azure/windows.yml
1915
parameters:
2016
name: Windows
2117
vmImage: vs2017-win2016
22-
- template: ci/azure/windows-py27.yml
23-
parameters:
24-
name: WindowsPy27
25-
vmImage: vs2017-win2016
2618

2719
- job: 'Checks_and_doc'
2820
pool:

ci/azure/linux.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

ci/azure/macos.yml renamed to ci/azure/posix.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,30 @@ jobs:
77
pool:
88
vmImage: ${{ parameters.vmImage }}
99
strategy:
10-
maxParallel: 11
1110
matrix:
12-
py35_np_120:
13-
ENV_FILE: ci/deps/azure-macos-35.yaml
14-
CONDA_PY: "35"
15-
PATTERN: "not slow and not network"
11+
${{ if eq(parameters.name, 'macOS') }}:
12+
py35_np_120:
13+
ENV_FILE: ci/deps/azure-macos-35.yaml
14+
CONDA_PY: "35"
15+
PATTERN: "not slow and not network"
16+
17+
${{ if eq(parameters.name, 'Linux') }}:
18+
py27_np_120:
19+
ENV_FILE: ci/deps/azure-27-compat.yaml
20+
CONDA_PY: "27"
21+
PATTERN: "not slow and not network"
22+
23+
py37_locale:
24+
ENV_FILE: ci/deps/azure-37-locale.yaml
25+
CONDA_PY: "37"
26+
PATTERN: "not slow and not network"
27+
LOCALE_OVERRIDE: "zh_CN.UTF-8"
28+
29+
py36_locale_slow:
30+
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
31+
CONDA_PY: "36"
32+
PATTERN: "not slow and not network"
33+
LOCALE_OVERRIDE: "it_IT.UTF-8"
1634

1735
steps:
1836
- script: |
@@ -39,7 +57,7 @@ jobs:
3957
- task: PublishTestResults@2
4058
inputs:
4159
testResultsFiles: 'test-data-*.xml'
42-
testRunTitle: 'MacOS-35'
60+
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
4361
- powershell: |
4462
$junitXml = "test-data-single.xml"
4563
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'

ci/azure/windows-py27.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

ci/azure/windows.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,28 @@ jobs:
77
pool:
88
vmImage: ${{ parameters.vmImage }}
99
strategy:
10-
maxParallel: 11
1110
matrix:
1211
py36_np14:
1312
ENV_FILE: ci/deps/azure-windows-36.yaml
1413
CONDA_PY: "36"
1514

15+
py27_np121:
16+
ENV_FILE: ci/deps/azure-windows-27.yaml
17+
CONDA_PY: "27"
18+
1619
steps:
1720
- task: CondaEnvironment@1
1821
inputs:
1922
updateConda: no
2023
packageSpecs: ''
2124

25+
- powershell: |
26+
$wc = New-Object net.webclient
27+
$wc.Downloadfile("https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi")
28+
Start-Process "VCForPython27.msi" /qn -Wait
29+
displayName: 'Install VC 9.0 only for Python 2.7'
30+
condition: eq(variables.CONDA_PY, '27')
31+
2232
- script: |
2333
ci\\incremental\\setup_conda_environment.cmd
2434
displayName: 'Before Install'
@@ -33,7 +43,7 @@ jobs:
3343
- task: PublishTestResults@2
3444
inputs:
3545
testResultsFiles: 'test-data.xml'
36-
testRunTitle: 'Windows 36'
46+
testRunTitle: 'Windows-$(CONDA_PY)'
3747
- powershell: |
3848
$junitXml = "test-data.xml"
3949
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'

doc/source/api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
.. The currentmodule is needed here because the autosummary generation of files
2+
.. happens before reading the files / substituting the header.
3+
.. See https://github.com/pandas-dev/pandas/pull/24232
4+
5+
.. currentmodule:: pandas
6+
17
.. _api:
28

39
{{ header }}

doc/source/whatsnew/v0.23.1.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ What's New in 0.23.1 (June 12, 2018)
55

66
{{ header }}
77

8-
.. ipython:: python
9-
:suppress:
10-
11-
from pandas import * # noqa F401, F403
12-
138

149
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
1510
and bug fixes. We recommend that all users upgrade to this version.
@@ -43,19 +38,20 @@ To summarize, here's the behavior in 0.22.0, 0.23.0, 0.23.1:
4338
.. code-block:: python
4439
4540
# 0.22.0... Silently coerce the datetime.date
46-
>>> Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
41+
>>> import datetime
42+
>>> pd.Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
4743
0 True
4844
1 False
4945
dtype: bool
5046
5147
# 0.23.0... Do not coerce the datetime.date
52-
>>> Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
48+
>>> pd.Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
5349
0 False
5450
1 False
5551
dtype: bool
5652
5753
# 0.23.1... Coerce the datetime.date with a warning
58-
>>> Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
54+
>>> pd.Series(pd.date_range('2017', periods=2)) == datetime.date(2017, 1, 1)
5955
/bin/python:1: FutureWarning: Comparing Series of datetimes with 'datetime.date'. Currently, the
6056
'datetime.date' is coerced to a datetime. In the future pandas will
6157
not coerce, and the values not compare equal to the 'datetime.date'.

doc/source/whatsnew/v0.23.2.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ What's New in 0.23.2 (July 5, 2018)
55

66
{{ header }}
77

8-
.. ipython:: python
9-
:suppress:
10-
11-
from pandas import * # noqa F401, F403
12-
138

149
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
1510
and bug fixes. We recommend that all users upgrade to this version.

doc/source/whatsnew/v0.23.4.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ What's New in 0.23.4 (August 3, 2018)
55

66
{{ header }}
77

8-
.. ipython:: python
9-
:suppress:
10-
11-
from pandas import * # noqa F401, F403
12-
138

149
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
1510
and bug fixes. We recommend that all users upgrade to this version.

doc/source/whatsnew/v0.24.0.rst

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ What's New in 0.24.0 (Month XX, 2018)
1010

1111
{{ header }}
1212

13-
.. ipython:: python
14-
:suppress:
15-
16-
from pandas import * # noqa F401, F403
17-
1813

1914
These are the changes in pandas 0.24.0. See :ref:`release` for a full changelog
2015
including other versions of pandas.
@@ -387,6 +382,33 @@ Backwards incompatible API changes
387382
- :meth:`read_csv` will now raise a ``ValueError`` if a column with missing values is declared as having dtype ``bool`` (:issue:`20591`)
388383
- The column order of the resultant :class:`DataFrame` from :meth:`MultiIndex.to_frame` is now guaranteed to match the :attr:`MultiIndex.names` order. (:issue:`22420`)
389384

385+
Percentage change on groupby changes
386+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
387+
388+
Fixed a bug where calling :func:`SeriesGroupBy.pct_change` or :func:`DataFrameGroupBy.pct_change` would previously work across groups when calculating the percent change, where it now correctly works per group (:issue:`21200`, :issue:`21235`).
389+
390+
.. ipython:: python
391+
392+
df = pd.DataFrame({'grp': ['a', 'a', 'b'], 'foo': [1.0, 1.1, 2.2]})
393+
df
394+
395+
Previous behavior:
396+
397+
.. code-block:: ipython
398+
399+
In [1]: df.groupby('grp').pct_change()
400+
Out[1]:
401+
foo
402+
0 NaN
403+
1 0.1
404+
2 1.0
405+
406+
New behavior:
407+
408+
.. ipython:: python
409+
410+
df.groupby('grp').pct_change()
411+
390412
.. _whatsnew_0240.api_breaking.deps:
391413

392414
Dependencies have increased minimum versions

0 commit comments

Comments
 (0)