Skip to content

Commit 27f39ed

Browse files
authored
Merge branch 'main' into groupby_cat_unobserved
2 parents 35e22e4 + 2a2daf7 commit 27f39ed

File tree

265 files changed

+1563
-3740
lines changed

Some content is hidden

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

265 files changed

+1563
-3740
lines changed

.github/workflows/32-bit-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.github/workflows/code-checks.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412

1513
env:
1614
ENV_FILE: environment.yml
@@ -88,7 +86,7 @@ jobs:
8886
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
8987
if: ${{ steps.build.outcome == 'success' && always() }}
9088

91-
- name: Typing
89+
- name: Typing + pylint
9290
uses: pre-commit/[email protected]
9391
with:
9492
extra_args: --hook-stage manual --all-files

.github/workflows/docbuild-and-upload.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
tags:
109
- '*'
1110
pull_request:
1211
branches:
1312
- main
1413
- 1.5.x
15-
- 1.4.x
1614

1715
env:
1816
ENV_FILE: environment.yml

.github/workflows/macos-windows.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.github/workflows/python-dev.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ on:
2525
branches:
2626
- main
2727
- 1.5.x
28-
- 1.4.x
2928
pull_request:
3029
branches:
3130
- main
3231
- 1.5.x
33-
- 1.4.x
3432
paths-ignore:
3533
- "doc/**"
3634

.github/workflows/sdist.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
types: [labeled, opened, synchronize, reopened]
1513
paths-ignore:
1614
- "doc/**"

.github/workflows/ubuntu.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
branches:
66
- main
77
- 1.5.x
8-
- 1.4.x
98
pull_request:
109
branches:
1110
- main
1211
- 1.5.x
13-
- 1.4.x
1412
paths-ignore:
1513
- "doc/**"
1614

.pre-commit-config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ repos:
1818
pass_filenames: true
1919
require_serial: false
2020
- repo: https://github.com/python/black
21-
rev: 22.8.0
21+
rev: 22.10.0
2222
hooks:
2323
- id: black
2424
- repo: https://github.com/codespell-project/codespell
25-
rev: v2.2.1
25+
rev: v2.2.2
2626
hooks:
2727
- id: codespell
2828
types_or: [python, rst, markdown]
2929
- repo: https://github.com/MarcoGorelli/cython-lint
30-
rev: v0.1.8
30+
rev: v0.2.1
3131
hooks:
3232
- id: cython-lint
3333
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -60,15 +60,16 @@ repos:
6060
- flake8-bugbear==22.7.1
6161
- pandas-dev-flaker==0.5.0
6262
- repo: https://github.com/pycqa/pylint
63-
rev: v2.15.3
63+
rev: v2.15.5
6464
hooks:
6565
- id: pylint
66+
stages: [manual]
6667
- repo: https://github.com/PyCQA/isort
6768
rev: 5.10.1
6869
hooks:
6970
- id: isort
7071
- repo: https://github.com/asottile/pyupgrade
71-
rev: v2.38.2
72+
rev: v3.2.0
7273
hooks:
7374
- id: pyupgrade
7475
args: [--py38-plus]
@@ -83,7 +84,7 @@ repos:
8384
types: [text] # overwrite types: [rst]
8485
types_or: [python, rst]
8586
- repo: https://github.com/sphinx-contrib/sphinx-lint
86-
rev: v0.6.1
87+
rev: v0.6.7
8788
hooks:
8889
- id: sphinx-lint
8990
- repo: https://github.com/asottile/yesqa

asv_bench/benchmarks/attrs_caching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setup(self):
1515
self.cur_index = self.df.index
1616

1717
def time_get_index(self):
18-
self.foo = self.df.index
18+
self.df.index
1919

2020
def time_set_index(self):
2121
self.df.index = self.cur_index

asv_bench/benchmarks/frame_methods.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@ def time_frame_get_numeric_data(self):
2828
self.df._get_numeric_data()
2929

3030

31-
class Lookup:
32-
def setup(self):
33-
self.df = DataFrame(np.random.randn(10000, 8), columns=list("abcdefgh"))
34-
self.df["foo"] = "bar"
35-
self.row_labels = list(self.df.index[::10])[:900]
36-
self.col_labels = list(self.df.columns) * 100
37-
self.row_labels_all = np.array(
38-
list(self.df.index) * len(self.df.columns), dtype="object"
39-
)
40-
self.col_labels_all = np.array(
41-
list(self.df.columns) * len(self.df.index), dtype="object"
42-
)
43-
44-
def time_frame_fancy_lookup(self):
45-
self.df.lookup(self.row_labels, self.col_labels)
46-
47-
def time_frame_fancy_lookup_all(self):
48-
self.df.lookup(self.row_labels_all, self.col_labels_all)
49-
50-
5131
class Reindex:
5232
def setup(self):
5333
N = 10**3

asv_bench/benchmarks/index_cached_properties.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,3 @@ def time_engine(self, index_type):
7070

7171
def time_inferred_type(self, index_type):
7272
self.idx.inferred_type
73-
74-
def time_is_all_dates(self, index_type):
75-
self.idx.is_all_dates

asv_bench/benchmarks/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class ToDatetimeFormat:
223223
def setup(self):
224224
N = 100000
225225
self.s = Series(["19MAY11", "19MAY11:00:00:00"] * N)
226-
self.s2 = self.s.str.replace(":\\S+$", "")
226+
self.s2 = self.s.str.replace(":\\S+$", "", regex=True)
227227

228228
self.same_offset = ["10/11/2018 00:00:00.045-07:00"] * N
229229
self.diff_offset = [

asv_bench/benchmarks/io/hdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def setup(self):
4343
np.random.randn(N, 100), index=date_range("1/1/2000", periods=N)
4444
)
4545
self.df_dc = DataFrame(
46-
np.random.randn(N, 10), columns=["C%03d" % i for i in range(10)]
46+
np.random.randn(N, 10), columns=[f"C{i:03d}" for i in range(10)]
4747
)
4848

4949
self.fname = "__test__.h5"

asv_bench/benchmarks/join_merge.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,6 @@
2222
from pandas import ordered_merge as merge_ordered
2323

2424

25-
class Append:
26-
def setup(self):
27-
self.df1 = DataFrame(np.random.randn(10000, 4), columns=["A", "B", "C", "D"])
28-
self.df2 = self.df1.copy()
29-
self.df2.index = np.arange(10000, 20000)
30-
self.mdf1 = self.df1.copy()
31-
self.mdf1["obj1"] = "bar"
32-
self.mdf1["obj2"] = "bar"
33-
self.mdf1["int1"] = 5
34-
self.mdf1 = self.mdf1._consolidate()
35-
self.mdf2 = self.mdf1.copy()
36-
self.mdf2.index = self.df2.index
37-
38-
def time_append_homogenous(self):
39-
self.df1.append(self.df2)
40-
41-
def time_append_mixed(self):
42-
self.mdf1.append(self.mdf2)
43-
44-
4525
class Concat:
4626

4727
params = [0, 1]

asv_bench/benchmarks/tslibs/timestamp.py

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,62 +50,58 @@ def time_from_pd_timestamp(self):
5050

5151

5252
class TimestampProperties:
53-
_freqs = [None, "B"]
54-
params = [_tzs, _freqs]
55-
param_names = ["tz", "freq"]
53+
params = [_tzs]
54+
param_names = ["tz"]
5655

57-
def setup(self, tz, freq):
58-
self.ts = Timestamp("2017-08-25 08:16:14", tzinfo=tz, freq=freq)
56+
def setup(self, tz):
57+
self.ts = Timestamp("2017-08-25 08:16:14", tzinfo=tz)
5958

60-
def time_tz(self, tz, freq):
59+
def time_tz(self, tz):
6160
self.ts.tz
6261

63-
def time_dayofweek(self, tz, freq):
62+
def time_dayofweek(self, tz):
6463
self.ts.dayofweek
6564

66-
def time_dayofyear(self, tz, freq):
65+
def time_dayofyear(self, tz):
6766
self.ts.dayofyear
6867

69-
def time_week(self, tz, freq):
68+
def time_week(self, tz):
7069
self.ts.week
7170

72-
def time_quarter(self, tz, freq):
71+
def time_quarter(self, tz):
7372
self.ts.quarter
7473

75-
def time_days_in_month(self, tz, freq):
74+
def time_days_in_month(self, tz):
7675
self.ts.days_in_month
7776

78-
def time_freqstr(self, tz, freq):
79-
self.ts.freqstr
80-
81-
def time_is_month_start(self, tz, freq):
77+
def time_is_month_start(self, tz):
8278
self.ts.is_month_start
8379

84-
def time_is_month_end(self, tz, freq):
80+
def time_is_month_end(self, tz):
8581
self.ts.is_month_end
8682

87-
def time_is_quarter_start(self, tz, freq):
83+
def time_is_quarter_start(self, tz):
8884
self.ts.is_quarter_start
8985

90-
def time_is_quarter_end(self, tz, freq):
86+
def time_is_quarter_end(self, tz):
9187
self.ts.is_quarter_end
9288

93-
def time_is_year_start(self, tz, freq):
89+
def time_is_year_start(self, tz):
9490
self.ts.is_year_start
9591

96-
def time_is_year_end(self, tz, freq):
92+
def time_is_year_end(self, tz):
9793
self.ts.is_year_end
9894

99-
def time_is_leap_year(self, tz, freq):
95+
def time_is_leap_year(self, tz):
10096
self.ts.is_leap_year
10197

102-
def time_microsecond(self, tz, freq):
98+
def time_microsecond(self, tz):
10399
self.ts.microsecond
104100

105-
def time_month_name(self, tz, freq):
101+
def time_month_name(self, tz):
106102
self.ts.month_name()
107103

108-
def time_weekday_name(self, tz, freq):
104+
def time_weekday_name(self, tz):
109105
self.ts.day_name()
110106

111107

ci/deps/actions-38-minimum_versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies:
3232
- gcsfs=2021.07.0
3333
- jinja2=3.0.0
3434
- lxml=4.6.3
35-
- matplotlib=3.6.0
35+
- matplotlib=3.6.1
3636
- numba=0.53.1
3737
- numexpr=2.7.3
3838
- odfpy=1.4.1

ci/fix_wheels.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
import zipfile
55

66
try:
7-
_, wheel_path, dest_dir = sys.argv
7+
if len(sys.argv) != 3:
8+
raise ValueError(
9+
"User must pass the path to the wheel and the destination directory."
10+
)
11+
wheel_path = sys.argv[1]
12+
dest_dir = sys.argv[2]
813
# Figure out whether we are building on 32 or 64 bit python
914
is_32 = sys.maxsize <= 2**32
1015
PYTHON_ARCH = "x86" if is_32 else "x64"
@@ -50,5 +55,4 @@
5055
if not success:
5156
os.remove(repaired_wheel_path)
5257
raise exception
53-
else:
54-
print(f"Successfully repaired wheel was written to {repaired_wheel_path}")
58+
print(f"Successfully repaired wheel was written to {repaired_wheel_path}")

doc/make.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ def latex(self, force=False):
259259
"You should check the file "
260260
'"build/latex/pandas.pdf" for problems.'
261261
)
262-
else:
263-
self._run_os("make")
262+
self._run_os("make")
264263
return ret_code
265264

266265
def latex_forced(self):

0 commit comments

Comments
 (0)