Skip to content

Commit 645e01e

Browse files
committed
Merge branch 'master' into PR_TOOL_MERGE_PR_26316
2 parents 4c86f53 + be4b48e commit 645e01e

File tree

397 files changed

+5441
-3063
lines changed

Some content is hidden

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

397 files changed

+5441
-3063
lines changed

asv_bench/benchmarks/ctors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@ class SeriesConstructors:
5555
[False, True],
5656
['float', 'int']]
5757

58+
# Generators get exhausted on use, so run setup before every call
59+
number = 1
60+
repeat = (3, 250, 10)
61+
5862
def setup(self, data_fmt, with_index, dtype):
63+
if data_fmt in (gen_of_str, gen_of_tuples) and with_index:
64+
raise NotImplementedError('Series constructors do not support '
65+
'using generators with indexes')
5966
N = 10**4
6067
if dtype == 'float':
6168
arr = np.random.randn(N)

asv_bench/benchmarks/frame_ctor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ class FromRecords:
7272
params = [None, 1000]
7373
param_names = ['nrows']
7474

75+
# Generators get exhausted on use, so run setup before every call
76+
number = 1
77+
repeat = (3, 250, 10)
78+
7579
def setup(self, nrows):
7680
N = 100000
7781
self.gen = ((x, (x * 20), (x * 100)) for x in range(N))

asv_bench/benchmarks/indexing.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pandas import (Series, DataFrame, MultiIndex,
66
Int64Index, UInt64Index, Float64Index,
77
IntervalIndex, CategoricalIndex,
8-
IndexSlice, concat, date_range)
8+
IndexSlice, concat, date_range, option_context)
99

1010

1111
class NumericSeriesIndexing:
@@ -335,4 +335,20 @@ def time_assign_with_setitem(self):
335335
self.df[i] = np.random.randn(self.N)
336336

337337

338+
class ChainIndexing:
339+
340+
params = [None, 'warn']
341+
param_names = ['mode']
342+
343+
def setup(self, mode):
344+
self.N = 1000000
345+
346+
def time_chained_indexing(self, mode):
347+
with warnings.catch_warnings(record=True):
348+
with option_context('mode.chained_assignment', mode):
349+
df = DataFrame({'A': np.arange(self.N), 'B': 'foo'})
350+
df2 = df[df.A > self.N // 2]
351+
df2['C'] = 1.0
352+
353+
338354
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/offset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
pass
1010

1111
hcal = pd.tseries.holiday.USFederalHolidayCalendar()
12-
# These offests currently raise a NotImplimentedError with .apply_index()
12+
# These offsets currently raise a NotImplimentedError with .apply_index()
1313
non_apply = [pd.offsets.Day(),
1414
pd.offsets.BYearEnd(),
1515
pd.offsets.BYearBegin(),

ci/azure/windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
displayName: 'Add conda to PATH'
2222
- script: conda update -q -n base conda
2323
displayName: Update conda
24-
- script: conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
24+
- script: |
25+
call activate
26+
conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
2527
displayName: 'Create anaconda environment'
2628
- script: |
2729
call activate pandas-dev

ci/code_checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ fi
256256
### DOCSTRINGS ###
257257
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
258258

259-
MSG='Validate docstrings (GL03, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG
260-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05
259+
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA05)' ; echo $MSG
260+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA05
261261
RET=$(($RET + $?)) ; echo $MSG "DONE"
262262

263263
fi

ci/deps/azure-35-compat.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
- hypothesis>=3.58.0
2323
- pytest-xdist
2424
- pytest-mock
25+
- pytest-azurepipelines
2526
- pip
2627
- pip:
2728
# for python 3.5, pytest>=4.0.2 is not available in conda

ci/deps/azure-36-locale.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- pytest>=4.0.2
2424
- pytest-xdist
2525
- pytest-mock
26+
- pytest-azurepipelines
2627
- hypothesis>=3.58.0
2728
- pip
2829
- pip:

ci/deps/azure-36-locale_slow.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies:
2929
- pytest>=4.0.2
3030
- pytest-xdist
3131
- pytest-mock
32+
- pytest-azurepipelines
3233
- moto
3334
- pip
3435
- pip:

ci/deps/azure-37-locale.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- pytest>=4.0.2
2929
- pytest-xdist
3030
- pytest-mock
31+
- pytest-azurepipelines
3132
- pip
3233
- pip:
3334
- hypothesis>=3.58.0

0 commit comments

Comments
 (0)