Skip to content

Commit

Permalink
fix deprecation warning from pandas
Browse files Browse the repository at this point in the history
the inplace version of pandas.fillna apparently shouldn't be used

see pandas-dev/pandas#16529
  • Loading branch information
zargot committed Jul 18, 2024
1 parent 58538fb commit e1e9ca2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/odm_sharing/private/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ def load(schema_path: str) -> Dict[RuleId, Rule]:
filename = Path(schema_path).name
ctx = SchemaCtx(filename)
data = pd.read_csv(schema_path)
data.fillna('', inplace=True) # replace NA values with empty string

# replace all different NA values with an empty string
data = data.fillna('')

# XXX: loading is aborted on header errors since row-parsing depends on it
validate_headers(ctx, data.columns.to_list())
Expand Down

0 comments on commit e1e9ca2

Please sign in to comment.