diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 20d8bd3bda21f..2a36f5fb478b4 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -5527,7 +5527,7 @@ def head(self, n: int = 5) -> Self: it returns an empty object. When ``n`` is negative, it returns all rows except the last ``|n|`` rows, mirroring the behavior of ``df[:n]``. - If n is larger than the number of rows, this function returns all rows. + If ``n`` is larger than the number of rows, this function returns all rows. Parameters ---------- @@ -5615,7 +5615,7 @@ def tail(self, n: int = 5) -> Self: For negative values of `n`, this function returns all rows except the first `|n|` rows, equivalent to ``df[|n|:]``. - If n is larger than the number of rows, this function returns all rows. + If ``n`` is larger than the number of rows, this function returns all rows. Parameters ----------