Skip to content

Commit 45517d8

Browse files
authored
Merge branch 'main' into doc_pivot_table
2 parents 684ab12 + d4045f0 commit 45517d8

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

.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].2
157157
with:
158158
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
159159
env:

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,7 @@ Other
835835
- Bug in :meth:`DataFrame.eval` and :meth:`DataFrame.query` which did not allow to use ``tan`` function. (:issue:`55091`)
836836
- Bug in :meth:`DataFrame.query` where using duplicate column names led to a ``TypeError``. (:issue:`59950`)
837837
- Bug in :meth:`DataFrame.query` which raised an exception or produced incorrect results when expressions contained backtick-quoted column names containing the hash character ``#``, backticks, or characters that fall outside the ASCII range (U+0001..U+007F). (:issue:`59285`) (:issue:`49633`)
838+
- Bug in :meth:`DataFrame.query` which raised an exception when querying integer column names using backticks. (:issue:`60494`)
838839
- Bug in :meth:`DataFrame.shift` where passing a ``freq`` on a DataFrame with no columns did not shift the index correctly. (:issue:`60102`)
839840
- Bug in :meth:`DataFrame.sort_index` when passing ``axis="columns"`` and ``ignore_index=True`` and ``ascending=False`` not returning a :class:`RangeIndex` columns (:issue:`57293`)
840841
- Bug in :meth:`DataFrame.transform` that was returning the wrong order unless the index was monotonically increasing. (:issue:`57069`)

pandas/core/dtypes/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class ExtensionDtype:
4545
"""
4646
A custom data type, to be paired with an ExtensionArray.
4747
48+
This enables support for third-party and custom dtypes within the
49+
pandas ecosystem. By implementing this interface and pairing it with a custom
50+
`ExtensionArray`, users can create rich data types that integrate cleanly
51+
with pandas operations, such as grouping, joining, or aggregation.
52+
4853
See Also
4954
--------
5055
extensions.register_extension_dtype: Register an ExtensionType

pandas/core/generic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ def _get_cleaned_column_resolvers(self) -> dict[Hashable, Series]:
612612
v, copy=False, index=self.index, name=k, dtype=dtype
613613
).__finalize__(self)
614614
for k, v, dtype in zip(self.columns, self._iter_column_arrays(), dtypes)
615-
if not isinstance(k, int)
616615
}
617616

618617
@final

pandas/tests/frame/test_query_eval.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,11 @@ def test_start_with_spaces(self, df):
13451345
expect = df[" A"] + df[" "]
13461346
tm.assert_series_equal(res, expect)
13471347

1348+
def test_ints(self, df):
1349+
res = df.query("`1` == 7")
1350+
expect = df[df[1] == 7]
1351+
tm.assert_frame_equal(res, expect)
1352+
13481353
def test_lots_of_operators_string(self, df):
13491354
res = df.query("` &^ :!€$?(} > <++*'' ` > 4")
13501355
expect = df[df[" &^ :!€$?(} > <++*'' "] > 4]

0 commit comments

Comments
 (0)