Skip to content

Commit 1d49d59

Browse files
sstiijnJulianWgs
authored andcommitted
DOC: Backticks missing in pandas.DataFrame.query (pandas-dev#40400)
1 parent 379f931 commit 1d49d59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/frame.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3784,7 +3784,7 @@ def _box_col_values(self, values, loc: int) -> Series:
37843784
# Unsorted
37853785

37863786
def query(self, expr: str, inplace: bool = False, **kwargs):
3787-
"""
3787+
r"""
37883788
Query the columns of a DataFrame with a boolean expression.
37893789
37903790
Parameters
@@ -3799,8 +3799,8 @@ def query(self, expr: str, inplace: bool = False, **kwargs):
37993799
You can refer to column names that are not valid Python variable names
38003800
by surrounding them in backticks. Thus, column names containing spaces
38013801
or punctuations (besides underscores) or starting with digits must be
3802-
surrounded by backticks. (For example, a column named "Area (cm^2) would
3803-
be referenced as `Area (cm^2)`). Column names which are Python keywords
3802+
surrounded by backticks. (For example, a column named "Area (cm^2)" would
3803+
be referenced as \`Area (cm^2)\`). Column names which are Python keywords
38043804
(like "list", "for", "import", etc) cannot be used.
38053805
38063806
For example, if one of your columns is called ``a a`` and you want

0 commit comments

Comments
 (0)