Skip to content

Commit 528108b

Browse files
carrouxTomAugspurger
authored andcommitted
Use correct random choice function in code snippet
A hidden code snippet uses `tm.choice()` when it should use `np.random.choice()` Author: Chris Carroux <[email protected]> Closes #12384 from carroux/patch-1 and squashes the following commits: 8babbdc [Chris Carroux] Use correct random choice function in code snippet
1 parent 672fb14 commit 528108b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/source/groupby.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ the length of the ``groups`` dict, so it is largely just a convenience:
217217
weight = np.random.normal(166, 20, size=n)
218218
height = np.random.normal(60, 10, size=n)
219219
time = pd.date_range('1/1/2000', periods=n)
220-
gender = tm.choice(['male', 'female'], size=n)
220+
gender = np.random.choice(['male', 'female'], size=n)
221221
df = pd.DataFrame({'height': height, 'weight': weight,
222222
'gender': gender}, index=time)
223223

0 commit comments

Comments
 (0)