Skip to content

Commit

Permalink
Implement suggestions by @coroa
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Hörsch <[email protected]>
  • Loading branch information
danielhuppmann and coroa committed Feb 22, 2023
1 parent 8602ef7 commit 4b6207c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ def convert_r_columns(c):
def _validate_complete_index(df):
"""Validate that there are no nan's in the (index) columns"""
null_cells = df.isnull()
null_rows = null_cells.T.any()
null_rows = null_cells.any(axis=1)
if null_rows.any():
null_cols = null_cells.any()
cols = ", ".join(null_cols[null_cols].index)
cols = ", ".join(null_cols.index[null_cols])
raise_data_error(
f"Empty cells in `data` (columns: '{cols}')", df.loc[null_rows]
)
Expand Down

0 comments on commit 4b6207c

Please sign in to comment.