mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 08:16:54 +08:00
Update processor.
This commit is contained in:
15
qlib/data/dataset/processor.py
Normal file → Executable file
15
qlib/data/dataset/processor.py
Normal file → Executable file
@@ -112,16 +112,13 @@ class Fillna(Processor):
|
|||||||
"""Process infinity """
|
"""Process infinity """
|
||||||
|
|
||||||
def __call__(self, df):
|
def __call__(self, df):
|
||||||
def fill_na(data):
|
def fill_na(df):
|
||||||
def process_na(df):
|
for col in df.columns:
|
||||||
for col in df.columns:
|
# FIXME: Such behavior is very weird
|
||||||
# FIXME: Such behavior is very weird
|
df[col] = df[col].fillna(0)
|
||||||
df[col] = df[col].fillna(0)
|
|
||||||
return df
|
|
||||||
|
|
||||||
data = datetime_groupby_apply(data, process_na)
|
df.sort_index(inplace=True)
|
||||||
data.sort_index(inplace=True)
|
return df
|
||||||
return data
|
|
||||||
|
|
||||||
return fill_na(df)
|
return fill_na(df)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user