Skip to content

Commit f78f736

Browse files
committed
fix missing value error
1 parent dafae75 commit f78f736

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

codonPython/check_consistent_measures.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pandas as pd
2+
import numpy as np
23

34

45
def check_consistent_measures(data, geography_col: str = "Org_Level", measure_col: str = "Measure", measures_set: set = set()) -> bool:
@@ -45,7 +46,7 @@ def check_consistent_measures(data, geography_col: str = "Org_Level", measure_co
4546
False
4647
"""
4748

48-
if any(data.isna()):
49+
if data.isna().any(axis=None):
4950
raise ValueError(
5051
f"Missing values at locations {list(map(tuple, np.argwhere(data.isna().values)))}")
5152
if not isinstance(geography_col, str) or not isinstance(measure_col, str):

0 commit comments

Comments
 (0)