diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 6424589843d76..7b70ac3588f2a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1918,7 +1918,7 @@ def keys(self) -> Index: b 2 4 c 3 8 >>> d.keys() - Index(['A', 'B'], dtype='object') + Index(['A', 'B'], dtype='str') """ return self._info_axis @@ -6276,7 +6276,7 @@ def dtypes(self): float float64 int int64 datetime datetime64[s] - string object + string str dtype: object """ data = self._mgr.get_dtypes() @@ -6838,7 +6838,7 @@ def convert_dtypes( 0 a 1 b 2 NaN - dtype: object + dtype: str Obtain a Series with dtype ``StringDtype``. @@ -8138,7 +8138,7 @@ def isna(self) -> Self: ... ) >>> df age born name toy - 0 5.0 NaT Alfred None + 0 5.0 NaT Alfred NaN 1 6.0 1939-05-27 Batman Batmobile 2 NaN 1940-04-25 Joker @@ -8211,7 +8211,7 @@ def notna(self) -> Self: ... ) >>> df age born name toy - 0 5.0 NaT Alfred None + 0 5.0 NaT Alfred NaN 1 6.0 1939-05-27 Batman Batmobile 2 NaN 1940-04-25 Joker @@ -10401,7 +10401,7 @@ def truncate( 2 b 3 c 4 d - Name: A, dtype: object + Name: A, dtype: str The index values in ``truncate`` can be datetimes or string dates.