-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressed situation when assign_default_confidence() returns only dat…
…aframe with all NaN confidence values (#548) Ok, so here was the problem: When the dataframe whose redundant rows had to be filtered out had all `NaN` values for confidence, the line https://github.com/mapping-commons/sssom-py/blob/550206721911f711ee678eb1a8da50591649bd04/src/sssom/util.py#L441 returned `df` = Empty dataframe and the entire source data frame = `nan_df`. Due to this, the following line: https://github.com/mapping-commons/sssom-py/blob/550206721911f711ee678eb1a8da50591649bd04/src/sssom/util.py#L447 result in `dfmax = {}` which is of type `pandas.Series`. Hence the confusion. The correct way to handle this is simple adding an `if` statement: https://github.com/mapping-commons/sssom-py/blob/ffa2109616020f994196cbb827d71bca17192014/src/sssom/util.py#L447-L469 I've added an explicit test and it passes. Fixes #546
- Loading branch information
Showing
2 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters