Skip to content

Commit 7504030

Browse files
authored
Merge branch 'main' into fix59933
2 parents 705c0c5 + 48b1571 commit 7504030

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

doc/source/user_guide/window.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ which will first group the data by the specified keys and then perform a windowi
7070

7171
Some windowing aggregation, ``mean``, ``sum``, ``var`` and ``std`` methods may suffer from numerical
7272
imprecision due to the underlying windowing algorithms accumulating sums. When values differ
73-
with magnitude :math:`1/np.finfo(np.double).eps` this results in truncation. It must be
73+
with magnitude ``1/np.finfo(np.double).eps`` (approximately :math:`4.5 \times 10^{15}`),
74+
this results in truncation. It must be
7475
noted, that large values may have an impact on windows, which do not include these values. `Kahan summation
7576
<https://en.wikipedia.org/wiki/Kahan_summation_algorithm>`__ is used
7677
to compute the rolling sums to preserve accuracy as much as possible.

pandas/core/series.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,7 +4651,7 @@ def rename(
46514651
inplace: Literal[True],
46524652
level: Level | None = ...,
46534653
errors: IgnoreRaise = ...,
4654-
) -> None: ...
4654+
) -> Series | None: ...
46554655

46564656
@overload
46574657
def rename(
@@ -4665,18 +4665,6 @@ def rename(
46654665
errors: IgnoreRaise = ...,
46664666
) -> Series: ...
46674667

4668-
@overload
4669-
def rename(
4670-
self,
4671-
index: Renamer | Hashable | None = ...,
4672-
*,
4673-
axis: Axis | None = ...,
4674-
copy: bool | lib.NoDefault = ...,
4675-
inplace: bool = ...,
4676-
level: Level | None = ...,
4677-
errors: IgnoreRaise = ...,
4678-
) -> Series | None: ...
4679-
46804668
def rename(
46814669
self,
46824670
index: Renamer | Hashable | None = None,
@@ -4734,8 +4722,9 @@ def rename(
47344722
47354723
Returns
47364724
-------
4737-
Series or None
4738-
Series with index labels or name altered or None if ``inplace=True``.
4725+
Series
4726+
A shallow copy with index labels or name altered, or the same object
4727+
if ``inplace=True`` and index is not a dict or callable else None.
47394728
47404729
See Also
47414730
--------

pandas/core/strings/accessor.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3549,12 +3549,29 @@ def casefold(self):
35493549
also includes other characters that can represent quantities such as
35503550
unicode fractions.
35513551
3552-
>>> s1 = pd.Series(['one', 'one1', '1', ''])
3552+
>>> s1 = pd.Series(['one', 'one1', '1', '', '³', '⅕'])
35533553
>>> s1.str.isnumeric()
35543554
0 False
35553555
1 False
35563556
2 True
35573557
3 False
3558+
4 True
3559+
5 True
3560+
dtype: bool
3561+
3562+
For a string to be considered numeric, all its characters must have a Unicode
3563+
numeric property matching :py:meth:`str.is_numeric`. As a consequence,
3564+
the following cases are **not** recognized as numeric:
3565+
3566+
- **Decimal numbers** (e.g., "1.1"): due to period ``"."``
3567+
- **Negative numbers** (e.g., "-5"): due to minus sign ``"-"``
3568+
- **Scientific notation** (e.g., "1e3"): due to characters like ``"e"``
3569+
3570+
>>> s2 = pd.Series(["1.1", "-5", "1e3"])
3571+
>>> s2.str.isnumeric()
3572+
0 False
3573+
1 False
3574+
2 False
35583575
dtype: bool
35593576
"""
35603577
_shared_docs["isalnum"] = """

pandas/io/formats/style.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ class Styler(StylerRenderer):
187187
188188
Attributes
189189
----------
190+
index : data.index Index
191+
columns : data.columns Index
190192
env : Jinja2 jinja2.Environment
191193
template_html : Jinja2 Template
192194
template_html_table : Jinja2 Template

0 commit comments

Comments
 (0)