Edit: I figured out that the issue was related to Jupyter notebooks. I can't set the seed globally and get the same result on every run. I have to set the random seed in the code cell with pd.util.testing.makeDataFrame().
Original question:
I'm trying to set the random state so I can get reproducible results for the DataFrames made with pandas's pd.util.testing.makeDataFrame().
I've set the random seed for Python and NumPy. Is there another random seed I can set to get reproducible results?
seed = 34
# python
import random
random.seed(seed)
# numpy
np.random.seed(seed)
I've searched SO to no avail.
I figured out that the issue was related to Jupyter notebooks. I can't set the seed for the notebook globally and get the same result on every run. I have to set the random seed in the code cell with pd.util.testing.makeDataFrame().
This SO answer helped confirm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With