bug fix
This commit is contained in:
parent
7a22314a46
commit
528e6db0b8
|
@ -306,7 +306,7 @@ class Shuffle(Generator):
|
|||
This is a method that will yield data with low utility
|
||||
"""
|
||||
def __init__(self,**_args):
|
||||
super().__init__(self)
|
||||
super().__init__(**_args)
|
||||
def run(self):
|
||||
|
||||
|
||||
|
@ -315,7 +315,8 @@ class Shuffle(Generator):
|
|||
np.random.shuffle(_index)
|
||||
_iocolumns = self.info['columns']
|
||||
_ocolumns = list(set(self._df.columns) - set(_iocolumns) )
|
||||
_iodf = pd.DataFrame(self._df[_ocolumns],self._df.loc[_index][_iocolumns],index=np.arange(self._df.shape[0]))
|
||||
# _iodf = pd.DataFrame(self._df[_ocolumns],self._df.loc[_index][_iocolumns],index=np.arange(_index.size))
|
||||
_iodf = pd.DataFrame(self._df[_iocolumns],index = np.arange(_index.size))
|
||||
self._df = self._df[_ocolumns].join(_iodf)
|
||||
|
||||
|
||||
|
@ -337,7 +338,7 @@ class factory :
|
|||
:param batch (default 2k) size of the batch
|
||||
"""
|
||||
|
||||
if _args['apply'] == 'shuffe' :
|
||||
if _args['apply'] == 'shuffle' :
|
||||
return Shuffle(**_args)
|
||||
elif _args['apply'] == 'generate' :
|
||||
return Generator(**_args)
|
||||
|
|
Loading…
Reference in New Issue