Skip to content

Commit 8302589

Browse files
committed
Merge remote-tracking branch 'remotes/upstream/master' into lucaionescu-mcmali
2 parents 3ba4169 + 06c5d24 commit 8302589

File tree

598 files changed

+2686
-1405
lines changed

Some content is hidden

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

598 files changed

+2686
-1405
lines changed

.pre-commit-config.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,20 @@ repos:
1111
language: python_venv
1212
additional_dependencies: [flake8-comprehensions>=3.1.0]
1313
- repo: https://github.com/pre-commit/mirrors-isort
14-
rev: v4.3.20
14+
rev: v4.3.21
1515
hooks:
1616
- id: isort
1717
language: python_venv
1818
exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v0.730
21+
hooks:
22+
- id: mypy
23+
# We run mypy over all files because of:
24+
# * changes in type definitions may affect non-touched files.
25+
# * Running it with `mypy pandas` and the filenames will lead to
26+
# spurious duplicate module errors,
27+
# see also https://github.com/pre-commit/mirrors-mypy/issues/5
28+
pass_filenames: false
29+
args:
30+
- pandas

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Release Notes
22
=============
33

44
The list of changes to Pandas between each release can be found
5-
[here](http://pandas.pydata.org/pandas-docs/stable/whatsnew.html). For full
5+
[here](https://pandas.pydata.org/pandas-docs/stable/whatsnew/index.html). For full
66
details, see the commit logs at http://github.com/pandas-dev/pandas.

asv_bench/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"project": "pandas",
88

99
// The project's homepage
10-
"project_url": "http://pandas.pydata.org/",
10+
"project_url": "https://pandas.pydata.org/",
1111

1212
// The URL of the source code repository for the project being
1313
// benchmarked

asv_bench/benchmarks/categoricals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
import pandas as pd
6-
import pandas.util.testing as tm
6+
import pandas._testing as tm
77

88
try:
99
from pandas.api.types import union_categoricals

asv_bench/benchmarks/ctors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DatetimeIndex, Index, MultiIndex, Series, Timestamp
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66

77
def no_change(arr):

asv_bench/benchmarks/frame_ctor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
try:
77
from pandas.tseries.offsets import Nano, Hour

asv_bench/benchmarks/frame_methods.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55

66
from pandas import DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range
7-
import pandas.util.testing as tm
7+
import pandas._testing as tm
88

99

1010
class GetNumericData:

asv_bench/benchmarks/gil.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, Series, date_range, factorize, read_csv
4+
import pandas._testing as tm
45
from pandas.core.algorithms import take_1d
5-
import pandas.util.testing as tm
66

77
try:
88
from pandas import (
@@ -24,7 +24,7 @@
2424
except ImportError:
2525
from pandas import algos
2626
try:
27-
from pandas.util.testing import test_parallel
27+
from pandas._testing import test_parallel
2828

2929
have_real_test_parallel = True
3030
except ImportError:

asv_bench/benchmarks/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
date_range,
1414
period_range,
1515
)
16-
import pandas.util.testing as tm
16+
import pandas._testing as tm
1717

1818
method_blacklist = {
1919
"object": {

asv_bench/benchmarks/index_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Series,
1313
date_range,
1414
)
15-
import pandas.util.testing as tm
15+
import pandas._testing as tm
1616

1717

1818
class SetOperations:

asv_bench/benchmarks/indexing.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
option_context,
1818
period_range,
1919
)
20-
import pandas.util.testing as tm
20+
import pandas._testing as tm
2121

2222

2323
class NumericSeriesIndexing:
@@ -131,6 +131,7 @@ def setup(self):
131131
self.col_scalar = columns[10]
132132
self.bool_indexer = self.df[self.col_scalar] > 0
133133
self.bool_obj_indexer = self.bool_indexer.astype(object)
134+
self.boolean_indexer = (self.df[self.col_scalar] > 0).astype("boolean")
134135

135136
def time_loc(self):
136137
self.df.loc[self.idx_scalar, self.col_scalar]
@@ -144,6 +145,9 @@ def time_boolean_rows(self):
144145
def time_boolean_rows_object(self):
145146
self.df[self.bool_obj_indexer]
146147

148+
def time_boolean_rows_boolean(self):
149+
self.df[self.boolean_indexer]
150+
147151

148152
class DataFrameNumericIndexing:
149153
def setup(self):

asv_bench/benchmarks/inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, Series, to_numeric
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from .pandas_vb_common import lib, numeric_dtypes
77

asv_bench/benchmarks/io/csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66

77
from pandas import Categorical, DataFrame, date_range, read_csv, to_datetime
8-
import pandas.util.testing as tm
8+
import pandas._testing as tm
99

1010
from ..pandas_vb_common import BaseIO
1111

asv_bench/benchmarks/io/excel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from odf.text import P
77

88
from pandas import DataFrame, ExcelWriter, date_range, read_excel
9-
import pandas.util.testing as tm
9+
import pandas._testing as tm
1010

1111

1212
def _generate_dataframe():

asv_bench/benchmarks/io/hdf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, HDFStore, date_range, read_hdf
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from ..pandas_vb_common import BaseIO
77

asv_bench/benchmarks/io/json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, concat, date_range, read_json, timedelta_range
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from ..pandas_vb_common import BaseIO
77

asv_bench/benchmarks/io/pickle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, date_range, read_pickle
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from ..pandas_vb_common import BaseIO
77

asv_bench/benchmarks/io/sql.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sqlalchemy import create_engine
55

66
from pandas import DataFrame, date_range, read_sql_query, read_sql_table
7-
import pandas.util.testing as tm
7+
import pandas._testing as tm
88

99

1010
class SQL:

asv_bench/benchmarks/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, date_range, read_stata
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from ..pandas_vb_common import BaseIO
77

asv_bench/benchmarks/join_merge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, Series, concat, date_range, merge, merge_asof
6-
import pandas.util.testing as tm
6+
import pandas._testing as tm
77

88
try:
99
from pandas import merge_ordered

asv_bench/benchmarks/multiindex_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, RangeIndex, date_range
6-
import pandas.util.testing as tm
6+
import pandas._testing as tm
77

88

99
class GetLoc:

asv_bench/benchmarks/reindex.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22

33
from pandas import DataFrame, Index, MultiIndex, Series, date_range, period_range
4-
import pandas.util.testing as tm
4+
import pandas._testing as tm
55

66
from .pandas_vb_common import lib
77

asv_bench/benchmarks/series_methods.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
from pandas import NaT, Series, date_range
6-
import pandas.util.testing as tm
6+
import pandas._testing as tm
77

88

99
class SeriesConstructor:

asv_bench/benchmarks/strings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
from pandas import DataFrame, Series
6-
import pandas.util.testing as tm
6+
import pandas._testing as tm
77

88

99
class Methods:

ci/code_checks.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
139139
RET=$(($RET + $?)) ; echo $MSG "DONE"
140140

141141
# Checks for test suite
142-
# Check for imports from pandas.util.testing instead of `import pandas.util.testing as tm`
143-
invgrep -R --include="*.py*" -E "from pandas.util.testing import" pandas/tests
142+
# Check for imports from pandas._testing instead of `import pandas._testing as tm`
143+
invgrep -R --include="*.py*" -E "from pandas._testing import" pandas/tests
144144
RET=$(($RET + $?)) ; echo $MSG "DONE"
145145
invgrep -R --include="*.py*" -E "from pandas.util import testing as tm" pandas/tests
146146
RET=$(($RET + $?)) ; echo $MSG "DONE"

ci/deps/travis-36-cov.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ dependencies:
3030
- openpyxl<=3.0.1
3131
# https://github.com/pandas-dev/pandas/pull/30009 openpyxl 3.0.2 broke
3232
- pandas-gbq
33-
# https://github.com/pydata/pandas-gbq/issues/271
34-
- google-cloud-bigquery<=1.11
3533
- psycopg2
3634
- pyarrow>=0.12.0
3735
- pymysql

conda.recipe/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ test:
3636

3737

3838
about:
39-
home: http://pandas.pydata.org
39+
home: https://pandas.pydata.org
4040
license: BSD

0 commit comments

Comments
 (0)