New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_ReindexCatIds is broken #52
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/thovden/pylabel/blob/c17d2c644f1dcb85ef3f9835c8771b96b969a673/pylabel/shared.py#L39
The
__ReindexCatIds
function is broken, mainly because it's operating on a copy of a DataFrame.The following code does not work in-place by default:
Hence, the rest of the function operates on a copy of the DataFrame, but the intention is to do in-place replacements of
df['cat_id']
.I also suspect the intention of the following code is probably to coerce
df['cat_id']
to an numeric type:However, these values are not written back to the original data frame.
I'm going to cleanup this function a little and submit a PR.
The text was updated successfully, but these errors were encountered: