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 14c171f commit 9fcb16dCopy full SHA for 9fcb16d
pandas/core/computation/parsing.py
@@ -231,7 +231,11 @@ def _split_by_backtick(s: str) -> list[tuple[bool, str]]:
231
if next_quote_index == -1:
232
substrings.append((False, substring + s[i:]))
233
break
234
- # Quote is matched
+ # Quote is matched, and the next quote is at the end of the string
235
+ elif next_quote_index + 1 == len(s):
236
+ substrings.append((False, substring + s[i:]))
237
+ break
238
+ # Quote is matched, and the next quote is in the middle of the string
239
else:
240
substring += s[i : next_quote_index + 1]
241
i = next_quote_index + 1
0 commit comments