Skip to content

Pandas nullable String dtype is not recognized as a Pandera String #1054

Answered by cosmicBboy
gwerbin-tive asked this question in Q&A
Discussion options

You must be logged in to vote

hi @gwerbin-tive, you'll need to use pandera.STRING here, since you want to use the pandera-native string type. See here for all the dtype aliases defined by pandera (pandera.String is the numpy string type).

In general the recommended way of doing this is to use the pd.StringDtype() directly or use the string alias "string". If you want to use the pandera datatype use pandera.STRING, which is just an alias of this.

Need to work on better datatype docs!

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by cosmicBboy
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@gwerbin-tive
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #1051 on December 14, 2022 15:28.