-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Unexpected behaviour in pandas_convert
method when setting scr
and to
to the same value. The current implementation contains an exit condition, which returns the series without making any conversions.
if src == to: |
Although this may provide some minor efficiency gains, it adds some unexpected behaviour. The main convert
function does not have a similar exit condition causing different values returned. For a series with mixed types (eg. ISO3 and other types) and converting to ISO3, pandas_convert
will return the series with original values, while convert
will still run the conversion setting values not found to "not found"
or another value set for the not_found
argument.
This can be resolved by removing the exit condition so that it aligns with the convert
functionality, or enhancing the documentation (or logging a warning for users)