Skip to content

Commit

Permalink
avoid FutureWarning when col is NA
Browse files Browse the repository at this point in the history
  • Loading branch information
bl-young committed Sep 5, 2023
1 parent 7e98417 commit 81d439c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flowsa/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ def compare_national_state_fbs(dataname=None, year=None, method=None,

groupby_fields = ['Flowable','Context','SectorProducedBy', 'SectorConsumedBy',
'Unit', 'Location', 'FlowUUID']
for g in groupby_fields:
if national[g].isna().all() & state[g].isna().all():
groupby_fields.remove(g)
if compare_metasources:
groupby_fields = groupby_fields + ['MetaSources']
subset_fields = groupby_fields + ['FlowAmount']
Expand Down

0 comments on commit 81d439c

Please sign in to comment.