Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no
Gbp-Pq: Name fix_random_seeds.patch
import random
import string
+ random.seed(123456) # for reproducibility
baseball = pd.DataFrame(
{'team': ["team %d" % (x + 1) for x in range(5)] * 5,
.. ipython:: python
import random
+ random.seed(123456) # for reproducibility
random.shuffle(tuples)
s = pd.Series(np.random.randn(8), index=pd.MultiIndex.from_tuples(tuples))
s
:suppress:
np.random.seed(123456)
+ random.seed(123456) # for reproducibility - bootstrap_plot uses random.sample
.. ipython:: python