@@ -885,7 +885,7 @@ def squeeze(self, axis: Axis | None = None) -> Scalar | Series | DataFrame:
885
885
dtype: int64
886
886
887
887
>>> even_primes.squeeze()
888
- np.int64(2)
888
+ 2
889
889
890
890
Squeezing objects with more than one value in every axis does nothing:
891
891
@@ -943,7 +943,7 @@ def squeeze(self, axis: Axis | None = None) -> Scalar | Series | DataFrame:
943
943
Squeezing all axes will project directly into a scalar:
944
944
945
945
>>> df_0a.squeeze()
946
- np.int64(1)
946
+ 1
947
947
"""
948
948
axes = range (self ._AXIS_LEN ) if axis is None else (self ._get_axis_number (axis ),)
949
949
result = self .iloc [
@@ -1918,7 +1918,7 @@ def keys(self) -> Index:
1918
1918
b 2 4
1919
1919
c 3 8
1920
1920
>>> d.keys()
1921
- Index(['A', 'B'], dtype='object ')
1921
+ Index(['A', 'B'], dtype='str ')
1922
1922
"""
1923
1923
return self ._info_axis
1924
1924
@@ -6276,7 +6276,7 @@ def dtypes(self):
6276
6276
float float64
6277
6277
int int64
6278
6278
datetime datetime64[s]
6279
- string object
6279
+ string str
6280
6280
dtype: object
6281
6281
"""
6282
6282
data = self ._mgr .get_dtypes ()
@@ -6838,7 +6838,7 @@ def convert_dtypes(
6838
6838
0 a
6839
6839
1 b
6840
6840
2 NaN
6841
- dtype: object
6841
+ dtype: str
6842
6842
6843
6843
Obtain a Series with dtype ``StringDtype``.
6844
6844
@@ -7968,7 +7968,7 @@ def asof(self, where, subset=None):
7968
7968
dtype: float64
7969
7969
7970
7970
>>> s.asof(20)
7971
- np.float64( 2.0)
7971
+ 2.0
7972
7972
7973
7973
For a sequence `where`, a Series is returned. The first value is
7974
7974
NaN, because the first element of `where` is before the first
@@ -7983,7 +7983,7 @@ def asof(self, where, subset=None):
7983
7983
NaN, even though NaN is at the index location for ``30``.
7984
7984
7985
7985
>>> s.asof(30)
7986
- np.float64( 2.0)
7986
+ 2.0
7987
7987
7988
7988
Take all columns into consideration
7989
7989
@@ -8138,7 +8138,7 @@ def isna(self) -> Self:
8138
8138
... )
8139
8139
>>> df
8140
8140
age born name toy
8141
- 0 5.0 NaT Alfred None
8141
+ 0 5.0 NaT Alfred NaN
8142
8142
1 6.0 1939-05-27 Batman Batmobile
8143
8143
2 NaN 1940-04-25 Joker
8144
8144
@@ -8211,7 +8211,7 @@ def notna(self) -> Self:
8211
8211
... )
8212
8212
>>> df
8213
8213
age born name toy
8214
- 0 5.0 NaT Alfred None
8214
+ 0 5.0 NaT Alfred NaN
8215
8215
1 6.0 1939-05-27 Batman Batmobile
8216
8216
2 NaN 1940-04-25 Joker
8217
8217
@@ -10401,7 +10401,7 @@ def truncate(
10401
10401
2 b
10402
10402
3 c
10403
10403
4 d
10404
- Name: A, dtype: object
10404
+ Name: A, dtype: str
10405
10405
10406
10406
The index values in ``truncate`` can be datetimes or string
10407
10407
dates.
@@ -11804,7 +11804,7 @@ def first_valid_index(self) -> Hashable:
11804
11804
>>> print(df.last_valid_index())
11805
11805
None
11806
11806
11807
- If all elements in DataFrame are NA/null, returns None .
11807
+ If all elements in DataFrame are NA/null, returns NaN .
11808
11808
11809
11809
>>> df = pd.DataFrame()
11810
11810
>>> df
0 commit comments