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

DOC: to_sql and extending pandas #43783

Open
1 task done
achapkowski opened this issue Sep 28, 2021 · 0 comments
Open
1 task done

DOC: to_sql and extending pandas #43783

achapkowski opened this issue Sep 28, 2021 · 0 comments
Labels
Docs ExtensionArray Extending pandas with custom dtypes or arrays. IO SQL to_sql, read_sql, read_sql_query

Comments

@achapkowski
Copy link

  • I have checked that the issue still exists on the latest versions of the docs on master here

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/development/extending.html

Documentation problem

When you create a custom Dtype with Pandas and you need to use the to_sql (write to a sqlite database), it is unclear how you can handle the custom dtypes. If at all from the documentation.

This is the error you get with custom datatypes:

File "pandas_libs\lib.pyx", line 1229, in pandas._libs.lib._try_infer_map
AttributeError: 'MyCustomType' object has no attribute 'base'

So does something on the Dtype or on the ExtensionArray need to define base and what is base?

Suggested fix for documentation

Explain if custom dtypes is supported with to_sql.

@achapkowski achapkowski added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 28, 2021
@mzeitlin11 mzeitlin11 added ExtensionArray Extending pandas with custom dtypes or arrays. IO SQL to_sql, read_sql, read_sql_query labels Sep 28, 2021
@mroeschke mroeschke removed the Needs Triage Issue that has not been reviewed by a pandas team member label Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs ExtensionArray Extending pandas with custom dtypes or arrays. IO SQL to_sql, read_sql, read_sql_query
Projects
None yet
Development

No branches or pull requests

3 participants