Skip to content

Commit 7e1d5d8

Browse files
committed
Problem from issue fixed
Signed-off-by: kevkle <[email protected]>
1 parent ca91dd4 commit 7e1d5d8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/core/generic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ def _get_cleaned_column_resolvers(self) -> dict[Hashable, Series]:
606606
v, copy=False, index=self.index, name=k, dtype=dtype
607607
).__finalize__(self)
608608
for k, v, dtype in zip(self.columns, self._iter_column_arrays(), dtypes)
609-
if not isinstance(k, int)
610609
}
611610

612611
@final

pandas/tests/frame/test_query_eval.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,11 @@ def test_unneeded_quoting(self, df):
13261326
expect = df[df["A"] > 2]
13271327
tm.assert_frame_equal(res, expect)
13281328

1329+
def test_quoting_with_ints(self, df):
1330+
res = df.query("`1` > 5")
1331+
expect = df[df[1] > 5]
1332+
tm.assert_frame_equal(res, expect)
1333+
13291334
def test_parenthesis(self, df):
13301335
res = df.query("`A (x)` > 2")
13311336
expect = df[df["A (x)"] > 2]

0 commit comments

Comments
 (0)