You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "FerriLuli (via GitHub)" <gi...@apache.org> on 2023/03/08 19:40:53 UTC

[GitHub] [arrow] FerriLuli opened a new issue, #34505: AttributeError 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when trying to a datetime in pandas to_sql command

FerriLuli opened a new issue, #34505:
URL: https://github.com/apache/arrow/issues/34505

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Hi everyone.
   I am trying to take data from one database using polars dataframe with Arrow data types and write it in another database using the method write_database from polars that runs the method to_sql from pandas in the back and I'm getting an error when my dataframe contains a datetime type column. 
   
   This is my code:
   
   `import polars as pl`
   `query = "SELECT getdate(), t.* FROM table "`
   `df_sql = pl.read_sql(query, conn_uri_db1)`
   `df_sql.schema`
   `df_sql.to_pandas(use_pyarrow_extension_array=True).to_sql('table_name', conn_uri_db2, if_exists='replace')`
   
   >Error message: 'ArrowExtensionArray' object has no attribute 'to_pydatetime'
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] FerriLuli commented on issue #34505: [Python] AttributeError 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when trying to a datetime in pandas to_sql command

Posted by "FerriLuli (via GitHub)" <gi...@apache.org>.
FerriLuli commented on issue #34505:
URL: https://github.com/apache/arrow/issues/34505#issuecomment-1461777457

   > @FerriLuli the `ArrowExtensionArray` is an object from the pandas library. Can you report it over there?
   
   Of course, I was actually trying to find out if it was an error of pandas object or in the conversion process, thank you so much, have a great day.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche commented on issue #34505: AttributeError 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when trying to a datetime in pandas to_sql command

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche commented on issue #34505:
URL: https://github.com/apache/arrow/issues/34505#issuecomment-1461580106

   @FerriLuli the `ArrowExtensionArray` is an object from the pandas library. Can you report it over there?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] jorisvandenbossche closed issue #34505: AttributeError 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when trying to a datetime in pandas to_sql command

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche closed issue #34505: AttributeError 'ArrowExtensionArray' object has no attribute 'to_pydatetime' when trying to a datetime in pandas to_sql command
URL: https://github.com/apache/arrow/issues/34505


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org