mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 16:26:55 +08:00
Update Dropna function in processor and check model loading and saving with pickle.
This commit is contained in:
@@ -112,12 +112,12 @@ class Fillna(Processor):
|
|||||||
"""Process infinity """
|
"""Process infinity """
|
||||||
|
|
||||||
def __call__(self, df):
|
def __call__(self, df):
|
||||||
def fill_na(df):
|
def fill_na(df, columns=None, fill=0):
|
||||||
for col in df.columns:
|
|
||||||
# FIXME: Such behavior is very weird
|
if columns == None:
|
||||||
df[col] = df[col].fillna(0)
|
columns = df.columns
|
||||||
|
df[columns] = df[columns].fillna(fill)
|
||||||
|
|
||||||
df.sort_index(inplace=True)
|
|
||||||
return df
|
return df
|
||||||
|
|
||||||
return fill_na(df)
|
return fill_na(df)
|
||||||
|
|||||||
Reference in New Issue
Block a user