Skip to content

Commit 1913ff8

Browse files
committed
Merge branch 'issue-TM' of https://github.com/xaris96/pandas into issue-TM
2 parents 08f06b9 + 965edf8 commit 1913ff8

File tree

161 files changed

+2839
-1259
lines changed

Some content is hidden

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

161 files changed

+2839
-1259
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ doc/cheatsheet @Dr-Irv
99
doc/source/development @noatamir
1010

1111
# pandas
12-
pandas/_libs/ @WillAyd
1312
pandas/_typing.py @Dr-Irv
1413
pandas/core/groupby/* @rhshadrach
1514
pandas/io/excel/* @rhshadrach

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body:
3131
attributes:
3232
label: Feature Description
3333
description: >
34-
Please describe how the new feature would be implemented, using psudocode if relevant.
34+
Please describe how the new feature would be implemented, using pseudocode if relevant.
3535
placeholder: >
3636
Add a new parameter to DataFrame, to_series, to return a Series if possible.
3737

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
154154

155155
- name: Build wheels
156-
uses: pypa/[email protected].1
156+
uses: pypa/[email protected].3
157157
with:
158158
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
159159
env:

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
minimum_pre_commit_version: 2.15.0
1+
minimum_pre_commit_version: 4.0.0
22
exclude: ^LICENSES/|\.(html|csv|svg)$
33
# reserve "manual" for relatively slow hooks which we still want to run in CI
44
default_stages: [
@@ -19,13 +19,13 @@ ci:
1919
skip: [pyright, mypy]
2020
repos:
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.9.9
22+
rev: v0.11.4
2323
hooks:
2424
- id: ruff
2525
args: [--exit-non-zero-on-fix]
2626
exclude: ^pandas/tests/frame/test_query_eval.py
2727
- id: ruff
28-
# TODO: remove autofixe-only rules when they are checked by ruff
28+
# TODO: remove autofix only rules when they are checked by ruff
2929
name: ruff-selected-autofixes
3030
alias: ruff-selected-autofixes
3131
files: ^pandas
@@ -34,7 +34,7 @@ repos:
3434
- id: ruff-format
3535
exclude: ^scripts|^pandas/tests/frame/test_query_eval.py
3636
- repo: https://github.com/jendrikseipp/vulture
37-
rev: 'v2.14'
37+
rev: v2.14
3838
hooks:
3939
- id: vulture
4040
entry: python scripts/run_vulture.py
@@ -95,14 +95,14 @@ repos:
9595
- id: sphinx-lint
9696
args: ["--enable", "all", "--disable", "line-too-long"]
9797
- repo: https://github.com/pre-commit/mirrors-clang-format
98-
rev: v19.1.7
98+
rev: v20.1.0
9999
hooks:
100100
- id: clang-format
101101
files: ^pandas/_libs/src|^pandas/_libs/include
102102
args: [-i]
103103
types_or: [c, c++]
104104
- repo: https://github.com/trim21/pre-commit-mirror-meson
105-
rev: v1.7.0
105+
rev: v1.7.2
106106
hooks:
107107
- id: meson-fmt
108108
args: ['--inplace']

AfterMixed.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
=========================== short test summary info ===========================
3+
FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0]
4+
FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0]
5+
FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1]
6+
FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32]
7+
FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0]
8+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22]
9+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23]
10+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32]
11+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4]
12+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2]
13+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first]
14+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last]
15+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first]
16+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last]
17+
==== 14 failed, 16452 passed, 221 skipped, 53 xfailed, 3 xpassed in 33.67s ====

after.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
XFAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-None]
2+
XFAILED pandas/tests/indexes/test_common.py::test_sort_values_invalid_na_position[mixed-int-string-middle]
3+
XFAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-first]
4+
XFAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[mixed-int-string-last]
5+
FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-maximum] - TypeError: '>=' not supported between instances of 'int' and 'str'
6+
FAILED pandas/tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[mixed-int-string-minimum] - TypeError: '<=' not supported between instances of 'int' and 'str'
7+
DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
8+
DONE FAILED pandas/tests/indexes/test_old_base.py::TestBase::test_numpy_argsort[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
9+
DONE FAILED pandas/tests/indexes/test_setops.py::test_union_same_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
10+
DONE FAILED pandas/tests/indexes/test_setops.py::test_union_different_types[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
11+
DONE FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_base[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
12+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_symmetric_difference[mixed-int-string] - TypeError: '<' not supported between instances of 'str' and 'int'
13+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'str' and 'int'
14+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-B-None] - TypeError: '<' not supported between instances of 'str' and 'int'
15+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-A-None-None] - TypeError: '<' not supported between instances of 'str' and 'int'
16+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-B-None] - TypeError: '<' not supported between instances of 'str' and 'int'
17+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_union_unequal[mixed-int-string-None-None-None] - TypeError: '<' not supported between instances of 'str' and 'int'
18+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-A-A] - TypeError: '<' not supported between instances of 'int' and 'str'
19+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-B-None] - TypeError: '<' not supported between instances of 'int' and 'str'
20+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-A-None-None] - TypeError: '<' not supported between instances of 'int' and 'str'
21+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-B-None] - TypeError: '<' not supported between instances of 'int' and 'str'
22+
FAILED pandas/tests/indexes/test_setops.py::TestSetOps::test_intersect_unequal[mixed-int-string-None-None-None] - TypeError: '<' not supported between instances of 'int' and 'str'
23+
24+
25+
26+
27+
28+
================================================ 32 failed, 16436 passed, 221 skipped, 51 xfailed, 3 xpassed in 37.47s ================================================

asv_bench/benchmarks/frame_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def setup(self):
517517
self.df = DataFrame(np.random.randn(1000, 100))
518518

519519
self.s = Series(np.arange(1028.0))
520-
self.df2 = DataFrame({i: self.s for i in range(1028)})
520+
self.df2 = DataFrame(dict.fromkeys(range(1028), self.s))
521521
self.df3 = DataFrame(np.random.randn(1000, 3), columns=list("ABC"))
522522

523523
def time_apply_user_func(self):

asv_bench/benchmarks/indexing_engines.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ class NumericEngineIndexing:
6767
def setup(self, engine_and_dtype, index_type, unique, N):
6868
engine, dtype = engine_and_dtype
6969

70+
if (
71+
index_type == "non_monotonic"
72+
and dtype in [np.int16, np.int8, np.uint8]
73+
and unique
74+
):
75+
# Values overflow
76+
raise NotImplementedError
77+
7078
if index_type == "monotonic_incr":
7179
if unique:
7280
arr = np.arange(N * 3, dtype=dtype)
@@ -115,6 +123,14 @@ def setup(self, engine_and_dtype, index_type, unique, N):
115123
engine, dtype = engine_and_dtype
116124
dtype = dtype.lower()
117125

126+
if (
127+
index_type == "non_monotonic"
128+
and dtype in ["int16", "int8", "uint8"]
129+
and unique
130+
):
131+
# Values overflow
132+
raise NotImplementedError
133+
118134
if index_type == "monotonic_incr":
119135
if unique:
120136
arr = np.arange(N * 3, dtype=dtype)

before.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FAILED pandas/tests/indexes/multi/test_setops.py::test_difference_keep_ea_dtypes[Float32-val0] - RuntimeWarning: invalid value encountered in cast
2+
FAILED pandas/tests/indexes/multi/test_setops.py::test_symmetric_difference_keeping_ea_dtype[Float32-val0] - RuntimeWarning: invalid value encountered in cast
3+
FAILED pandas/tests/indexes/multi/test_setops.py::test_union_with_duplicates_keep_ea_dtype[Float32-dupe_val1] - RuntimeWarning: invalid value encountered in cast
4+
FAILED pandas/tests/indexes/multi/test_setops.py::test_union_keep_ea_dtype_with_na[Float32] - RuntimeWarning: invalid value encountered in cast
5+
FAILED pandas/tests/indexes/multi/test_setops.py::test_intersection_keep_ea_dtypes[Float32-val0] - RuntimeWarning: invalid value encountered in cast
6+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-4-val22] - RuntimeWarning: invalid value encountered in cast
7+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked[Float32-val3-val23] - RuntimeWarning: invalid value encountered in cast
8+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_loc_masked_na[Float32] - RuntimeWarning: invalid value encountered in cast
9+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-4] - RuntimeWarning: invalid value encountered in cast
10+
FAILED pandas/tests/indexes/numeric/test_indexing.py::TestGetIndexer::test_get_indexer_masked_na[Float32-2] - RuntimeWarning: invalid value encountered in cast
11+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-first] - RuntimeWarning: invalid value encountered in cast
12+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[complex64-last] - RuntimeWarning: invalid value encountered in cast
13+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-first] - RuntimeWarning: invalid value encountered in cast
14+
FAILED pandas/tests/indexes/test_common.py::test_sort_values_with_missing[nullable_float-last] - RuntimeWarning: invalid value encountered in cast
15+
16+

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
75-
-i "pandas.Timestamp.max PR02" \
76-
-i "pandas.Timestamp.min PR02" \
77-
-i "pandas.Timestamp.resolution PR02" \
7875
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
7976
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
8077
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \

0 commit comments

Comments
 (0)