Skip to content

Commit 27811ee

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix_deprecation_order
Merging the changes made in 24215, to rectify the _decorators.py behavior
2 parents 470f265 + 040f06f commit 27811ee

File tree

163 files changed

+3065
-2141
lines changed

Some content is hidden

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

163 files changed

+3065
-2141
lines changed

azure-pipelines.yml

+4-12
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

-79
This file was deleted.

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

+24-6
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

-58
This file was deleted.

ci/azure/windows.yml

+12-2
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/10min.rst

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
.. _10min:
22

3-
.. currentmodule:: pandas
4-
5-
.. ipython:: python
6-
:suppress:
7-
8-
import os
9-
import numpy as np
10-
11-
import pandas as pd
12-
13-
np.random.seed(123456)
14-
np.set_printoptions(precision=4, suppress=True)
15-
pd.options.display.max_rows = 15
16-
17-
# portions of this were borrowed from the
18-
# Pandas cheatsheet
19-
# created during the PyData Workshop-Sprint 2012
20-
# Hannah Chen, Henry Chow, Eric Cox, Robert Mauriello
21-
3+
{{ header }}
224

235
********************
246
10 Minutes to pandas
@@ -69,7 +51,7 @@ Creating a ``DataFrame`` by passing a dict of objects that can be converted to s
6951
'F': 'foo'})
7052
df2
7153
72-
The columns of the resulting ``DataFrame`` have different
54+
The columns of the resulting ``DataFrame`` have different
7355
:ref:`dtypes <basics.dtypes>`.
7456

7557
.. ipython:: python
@@ -83,7 +65,7 @@ will be completed:
8365
.. ipython::
8466

8567
@verbatim
86-
In [1]: df2.<TAB>
68+
In [1]: df2.<TAB> # noqa: E225, E999
8769
df2.A df2.bool
8870
df2.abs df2.boxplot
8971
df2.add df2.C
@@ -513,7 +495,7 @@ Another example that can be given is:
513495
Append
514496
~~~~~~
515497

516-
Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
498+
Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
517499
section.
518500

519501
.. ipython:: python
@@ -546,14 +528,14 @@ See the :ref:`Grouping section <groupby>`.
546528
'D': np.random.randn(8)})
547529
df
548530
549-
Grouping and then applying the :meth:`~DataFrame.sum` function to the resulting
531+
Grouping and then applying the :meth:`~DataFrame.sum` function to the resulting
550532
groups.
551533

552534
.. ipython:: python
553535
554536
df.groupby('A').sum()
555537
556-
Grouping by multiple columns forms a hierarchical index, and again we can
538+
Grouping by multiple columns forms a hierarchical index, and again we can
557539
apply the ``sum`` function.
558540

559541
.. ipython:: python
@@ -689,7 +671,7 @@ Convert the raw grades to a categorical data type.
689671
df["grade"] = df["raw_grade"].astype("category")
690672
df["grade"]
691673
692-
Rename the categories to more meaningful names (assigning to
674+
Rename the categories to more meaningful names (assigning to
693675
``Series.cat.categories`` is inplace!).
694676

695677
.. ipython:: python
@@ -738,7 +720,7 @@ See the :ref:`Plotting <visualization>` docs.
738720
@savefig series_plot_basic.png
739721
ts.plot()
740722
741-
On a DataFrame, the :meth:`~DataFrame.plot` method is a convenience to plot all
723+
On a DataFrame, the :meth:`~DataFrame.plot` method is a convenience to plot all
742724
of the columns with labels:
743725

744726
.. ipython:: python
@@ -773,6 +755,7 @@ CSV
773755
.. ipython:: python
774756
:suppress:
775757
758+
import os
776759
os.remove('foo.csv')
777760
778761
HDF5

doc/source/advanced.rst

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
.. _advanced:
22

3-
.. currentmodule:: pandas
4-
5-
.. ipython:: python
6-
:suppress:
7-
8-
import numpy as np
9-
import pandas as pd
10-
np.random.seed(123456)
11-
np.set_printoptions(precision=4, suppress=True)
12-
pd.options.display.max_rows = 15
3+
{{ header }}
134

145
******************************
156
MultiIndex / Advanced Indexing
@@ -572,7 +563,8 @@ they need to be sorted. As with any index, you can use :meth:`~DataFrame.sort_in
572563

573564
.. ipython:: python
574565
575-
import random; random.shuffle(tuples)
566+
import random
567+
random.shuffle(tuples)
576568
s = pd.Series(np.random.randn(8), index=pd.MultiIndex.from_tuples(tuples))
577569
s
578570
s.sort_index()
@@ -702,7 +694,7 @@ Finally, as a small note on performance, because the ``take`` method handles
702694
a narrower range of inputs, it can offer performance that is a good deal
703695
faster than fancy indexing.
704696

705-
.. ipython::
697+
.. ipython:: python
706698
707699
arr = np.random.randn(10000, 5)
708700
indexer = np.arange(10000)

0 commit comments

Comments
 (0)