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

feature: support string column validation for pandas 2.1.3 #1425

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

karlma821
Copy link
Contributor

@karlma821 karlma821 commented Nov 15, 2023

The problem and solution are as described in #1424.

This PR

  • casts is_python_string.astype(bool) in NpString.check
  • adds tests for data_type.check to ensure the check results are always boolean or reduceable to boolean-like by .all(), in order to pass the column validation in ArraySchemaBackend.check_dtype

@karlma821 karlma821 changed the title Feature/1424 feature: support string column validation for pandas 2.1.3 Nov 15, 2023
@karlma821
Copy link
Contributor Author

@cosmicBboy please help review the PR 🙏🏼

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (af0e5c0) 94.23% compared to head (d2ae52b) 94.25%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1425      +/-   ##
==========================================
+ Coverage   94.23%   94.25%   +0.01%     
==========================================
  Files          91       91              
  Lines        6976     6976              
==========================================
+ Hits         6574     6575       +1     
+ Misses        402      401       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cosmicBboy
Copy link
Collaborator

Thanks @karlma821 and congrats on your first PR to pandera! 🚀

@cosmicBboy cosmicBboy merged commit a318e48 into unionai-oss:main Dec 4, 2023
55 checks passed
max-raphael pushed a commit to max-raphael/pandera that referenced this pull request Jan 24, 2025
…ss#1425)

* fix: always cast series to bool dtype

Signed-off-by: karlma821 <[email protected]>

* test: add test_pandas_data_type_check

Signed-off-by: karlma821 <[email protected]>

---------

Signed-off-by: karlma821 <[email protected]>
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