Open chrispijo opened 3 years ago
Hmm, so this comes down to the fact that:
>>>import pandas as pd
>>>import numpy as np
>>> np.dtype(str)
dtype('<U')
>>> pd.StringDtype()
StringDtype
>>> np.issubdtype(np.dtype(str), pd.StringDtype())
TypeError: Cannot interpret 'StringDtype' as a data type
However, I'm not actually sure why this is the case. I would have thought an official Pandas Dtype extension would be compatible with the numpy API. I will look into it, but I'm happy to hear your input on how this should be implemented.
Ok. Good to know. Thanks for the quick response.
Hi. I am trying to confirm if all values in a Pandas-column are off type string. Doing this with
IsDtypeValidation
returns the errorTypeError: Cannot interpret 'StringDtype' as a data type'
. I made a topic on StackOverflow, and based on the comments I suspect that this might actually be in error in the IsDtypeValidation-class.Is this an error? Or do I misuse the class/package?
Besides that, awesome work! Really handy package.