AssertionError creating array with StringDtype instead of StringDtype(), can we have a friendlier error message? #31356
Labels
Enhancement
Error Reporting
Incorrect or improved errors from pandas
Strings
String extension data type and string data
The following fails with an
AssertionError
on pandas 1.0.0rc0:I wrote this by mistake — this works:
When running the former, I get a traceback with an AssertionError:
Coming from numpy, I find it unconventional that the type ending in
dtype
is not itself a valid dtype, but rather a constructor for such a dtype. Therefore, I would consider that a friendlier error message could be in order (or maybe it should even work).I'm running pandas 1.0.0rc0 on Python 3.7.6.
The full environment:
# Your code here
The text was updated successfully, but these errors were encountered: