We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a364ffb commit 14c171fCopy full SHA for 14c171f
pandas/core/computation/parsing.py
@@ -227,16 +227,17 @@ def _split_by_backtick(s: str) -> list[tuple[bool, str]]:
227
next_quote_index = i + end - 1
228
break
229
230
- # Quote is unmatched
+ # Quote is unmatched (Possibly a mistake)
231
if next_quote_index == -1:
232
- next_backtick_index = s.find("`", backtick_index + 1)
+ substrings.append((False, substring + s[i:]))
233
+ break
234
# Quote is matched
235
else:
- substring += s[i:next_quote_index]
236
- i = next_quote_index
+ substring += s[i : next_quote_index + 1]
237
+ i = next_quote_index + 1
238
continue
239
- # Backtick is unmatched
240
+ # Backtick is unmatched (Possibly a mistake)
241
if next_backtick_index == -1:
242
substrings.append((False, substring + s[i:]))
243
0 commit comments