Skip to content

Commit

Permalink
Update goruping and name
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvanhoey committed Apr 17, 2024
1 parent 985c13d commit 52e886a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion niche_vlaanderen/codetables.py
Expand Up @@ -45,7 +45,11 @@ def check_lower_upper_boundaries(df, min_col, max_col, value):
"""

group_cols = set(df.columns.tolist()) - {min_col, max_col, value}
for sel_group, subtable in df.groupby(list(group_cols)):
if len(list(group_cols)) > 0:
groups = list(group_cols)
else:
groups = list(group_cols)[0]
for sel_group, subtable in df.groupby(groups):
min_values = subtable[min_col]
max_values = subtable[max_col]
for (i, index) in enumerate(min_values.index):
Expand Down
1 change: 1 addition & 0 deletions tests/test_validation.py
Expand Up @@ -11,6 +11,7 @@

def test_validation(zwarte_beek_niche, path_testdata):
myniche = zwarte_beek_niche()
myniche.name = "zwarte beek"
myniche.run()

no = NicheValidation(
Expand Down

0 comments on commit 52e886a

Please sign in to comment.