Skip to content
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

fix: remove Category inheritance from ArrowDictionary #1848

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

darenliang
Copy link

This PR removes Category inheritance from ArrowDictionary because it does not need the category attribute check here: https://github.com/unionai-oss/pandera/blob/main/pandera/dtypes.py#L483

Old behavior:

import pyarrow
from pandera.engines.pandas_engine import ArrowDictionary

int64_dictionary = ArrowDictionary(value_type=pyarrow.int64())
string_dictionary = ArrowDictionary(value_type=pyarrow.string())

int64_dictionary.check(string_dictionary)  # True

New behavior:

int64_dictionary.check(string_dictionary)  # False

@cosmicBboy
Copy link
Collaborator

@darenliang thanks for the contribution!

mind resolving the merge conflict?

@darenliang
Copy link
Author

@cosmicBboy Fixed the merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants