-
Notifications
You must be signed in to change notification settings - Fork 71
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
Regression with v0.5.13 introducing StringArray #172
Comments
This seems like this should be an option perhaps? Also is there any easy workaround by updating the dtype before calling to_hdf? |
There's also a query option designed for disabling "advanced" pandas types which solves the problem. Please try: df = client.query_df(query="SELECT 'TEST' as test", use_na_values=False) |
Yes changing the types of some columns before using |
Glad to hear it, I think that option should reduce the dtypes used to the basic numpy types (plus pandas Timestamp), so it probably should have been named "use_advanced_dtypes" or something along those lines. |
I agree that an option to disable or enable experimental dtypes might be useful.
|
I'll take a look at that, it's probably fairly easy to make the same option return an object array with NULL numeric columns. |
Yes, it's an easy change and I think it's more consistent to avoid all non-numpy dtypes if that flag is set. It will be fixed in the next release (tentatively scheduled for next week.) |
Renamed the flag in the new release 0.5.21 to use_extended_dtypes. Setting this to |
I tried this version and setting and |
Thanks for testing and for reporting the result. Feedback is always much appreciated! |
Describe the bug
Starting 0.5.13, pandas' StringArray are used, but it is only experimental and not well supported.
As a result, exporting a pandas dataframe with
to_hdf
lead to the following error:TypeError: objects of type ``StringArray`` are not supported in this context, sorry; supported objects are: NumPy array, record or scalar; homogeneous list or tuple, integer, float, complex or bytes
Steps to reproduce
Code example
Expected behaviour
The export should not raise an exception and
df.types
should probably returninstead of
Configuration
Environment
The text was updated successfully, but these errors were encountered: