Skip to content
Snippets Groups Projects
Commit c6352472 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

Better debug output in null check

parent 298dfae2
No related merge requests found
......@@ -579,5 +579,5 @@ def ensemble_predictions(models, peptides_df, mask_indices_list=None):
values = panel.ix[:, :, col]
assert values.shape == (len(peptides_df), len(models))
result[col] = model.combine_ensemble_predictions(col, values.values)
assert_no_null(result[col])
assert_no_null(pandas.Series(result[col]))
return result
......@@ -188,8 +188,8 @@ def describe_nulls(df, related_df_with_same_index_to_describe=None):
if isinstance(df, pandas.Series):
df = df.to_frame()
with pandas.option_context('mode.use_inf_as_null', True):
null_counts_by_col = df.isnull().sum(axis=0)
null_rows = df.isnull().sum(axis=1) > 0
null_counts_by_col = pandas.isnull(df).sum(axis=0)
null_rows = pandas.isnull(df).sum(axis=1) > 0
return (
"Columns with nulls:\n%s, related rows with nulls:\n%s, "
"full df:\n%s" % (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment