Skip to content

Commit 0212ee8

Browse files
committed
use a fixed random seed
1 parent 0ea8bc9 commit 0212ee8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/sparse/test_pivot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
class TestPivotTable:
1212

1313
def setup_method(self, method):
14+
rs = np.random.RandomState(0)
1415
self.dense = pd.DataFrame({'A': ['foo', 'bar', 'foo', 'bar',
1516
'foo', 'bar', 'foo', 'foo'],
1617
'B': ['one', 'one', 'two', 'three',
1718
'two', 'two', 'one', 'three'],
18-
'C': np.random.randn(8),
19-
'D': np.random.randn(8),
19+
'C': rs.randn(8),
20+
'D': rs.randn(8),
2021
'E': [np.nan, np.nan, 1, 2,
2122
np.nan, 1, np.nan, np.nan]})
2223
self.sparse = self.dense.to_sparse()

0 commit comments

Comments
 (0)