@@ -7087,8 +7087,8 @@ def sort_values(
70877087 using the `natsort <https://github.com/SethMMorton/natsort>` package.
70887088
70897089 >>> df = pd.DataFrame({
7090- ... "time": ['0hr', '128hr', '72hr', '48hr', '96hr'],
7091- ... "value": [10, 20, 30, 40, 50]
7090+ ... "time": ['0hr', '128hr', '72hr', '48hr', '96hr'],
7091+ ... "value": [10, 20, 30, 40, 50]
70927092 ... })
70937093 >>> df
70947094 time value
@@ -9035,8 +9035,8 @@ def update(
90359035 We can also choose to include NA in group keys or not by setting
90369036 `dropna` parameter, the default setting is `True`.
90379037
9038- >>> l = [[1, 2, 3], [1, None, 4], [2, 1, 3], [1, 2, 2]]
9039- >>> df = pd.DataFrame(l , columns=["a", "b", "c"])
9038+ >>> arr = [[1, 2, 3], [1, None, 4], [2, 1, 3], [1, 2, 2]]
9039+ >>> df = pd.DataFrame(arr , columns=["a", "b", "c"])
90409040
90419041 >>> df.groupby(by=["b"]).sum()
90429042 a c
@@ -9051,8 +9051,8 @@ def update(
90519051 2.0 2 5
90529052 NaN 1 4
90539053
9054- >>> l = [["a", 12, 12], [None, 12.3, 33.], ["b", 12.3, 123], ["a", 1, 1]]
9055- >>> df = pd.DataFrame(l , columns=["a", "b", "c"])
9054+ >>> arr = [["a", 12, 12], [None, 12.3, 33.], ["b", 12.3, 123], ["a", 1, 1]]
9055+ >>> df = pd.DataFrame(arr , columns=["a", "b", "c"])
90569056
90579057 >>> df.groupby(by="a").sum()
90589058 b c
@@ -12569,7 +12569,7 @@ def values(self) -> np.ndarray:
1256912569 A DataFrame where all columns are the same type (e.g., int64) results
1257012570 in an array of the same type.
1257112571
12572- >>> df = pd.DataFrame({'age': [ 3, 29],
12572+ >>> df = pd.DataFrame({'age': [3, 29],
1257312573 ... 'height': [94, 170],
1257412574 ... 'weight': [31, 115]})
1257512575 >>> df
@@ -12589,10 +12589,10 @@ def values(self) -> np.ndarray:
1258912589 results in an ndarray of the broadest type that accommodates these
1259012590 mixed types (e.g., object).
1259112591
12592- >>> df2 = pd.DataFrame([('parrot', 24.0, 'second'),
12593- ... ('lion', 80.5, 1),
12592+ >>> df2 = pd.DataFrame([('parrot', 24.0, 'second'),
12593+ ... ('lion', 80.5, 1),
1259412594 ... ('monkey', np.nan, None)],
12595- ... columns=('name', 'max_speed', 'rank'))
12595+ ... columns=('name', 'max_speed', 'rank'))
1259612596 >>> df2.dtypes
1259712597 name object
1259812598 max_speed float64
0 commit comments