bug fix: random shuffle
This commit is contained in:
parent
b9596edd8e
commit
c1c17bc59d
|
@ -559,7 +559,7 @@ class Shuffle(Generator):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
||||||
np.random.seed(1)
|
|
||||||
|
|
||||||
self.initalize()
|
self.initalize()
|
||||||
#
|
#
|
||||||
|
@ -589,10 +589,12 @@ class Shuffle(Generator):
|
||||||
for _columns in _invColumns :
|
for _columns in _invColumns :
|
||||||
|
|
||||||
_tmpdf = self._df[_columns].copy()[_columns]
|
_tmpdf = self._df[_columns].copy()[_columns]
|
||||||
|
np.random.seed(1)
|
||||||
np.random.shuffle(_index)
|
np.random.shuffle(_index)
|
||||||
|
print (_columns,_index)
|
||||||
_tmpdf = _tmpdf.iloc[_index]
|
# _values = _tmpdf.values[_index]
|
||||||
|
#_tmpdf = _tmpdf.iloc[_index]
|
||||||
|
_tmpdf = pd.DataFrame(_tmpdf.values[_index],columns=_columns)
|
||||||
if _xdf.shape[0] == 0 :
|
if _xdf.shape[0] == 0 :
|
||||||
_xdf = _tmpdf
|
_xdf = _tmpdf
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue