Skip to content

Commit

Permalink
use isnull instead of isna, and remove .to_list()
Browse files Browse the repository at this point in the history
  • Loading branch information
hailiangliu89 committed Feb 13, 2019
1 parent ce41ea4 commit 3569268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypsa/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,11 @@ def consistency_check(self):

# check for NaN values:
if max_pu.isnull().values.any():
for col in max_pu.columns[max_pu.isna().any()].tolist():
for col in max_pu.columns[max_pu.isnull().any()]:
logger.warning("The attribute %s of element %s of %s has NaN values for the following snapshots:\n%s",
varying_attr[0][0] + "_max_pu", col, c.list_name, max_pu.index[max_pu[col].isnull()])
if min_pu.isnull().values.any():
for col in min_pu.columns[min_pu.isna().any()].tolist():
for col in min_pu.columns[min_pu.isnull().any()]:
logger.warning("The attribute %s of element %s of %s has NaN values for the following snapshots:\n%s",
varying_attr[0][0] + "_min_pu", col, c.list_name, min_pu.index[min_pu[col].isnull()])

Expand Down

0 comments on commit 3569268

Please sign in to comment.