Fix bug when nan_policy='raise'
This commit is contained in:
parent
b31ae6686f
commit
bae93b2c8e
@ -31,6 +31,7 @@ def check_nan(df, nan_policy):
|
||||
if nan_policy == 'raise':
|
||||
if pd.isna(df).any(axis=None):
|
||||
raise ValueError('NaN in input, pass nan_policy="warn" or "omit" to ignore')
|
||||
return df
|
||||
elif nan_policy == 'warn':
|
||||
df_cleaned = df.dropna()
|
||||
if len(df_cleaned) < len(df):
|
||||
|
Loading…
Reference in New Issue
Block a user