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

[GitHub] [arrow] lukemanley opened a new issue, #34462: Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types

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

   ### Describe the enhancement requested
   
   Pyarrow `timestamp(unit).to_pandas_dtype()` and `duration(unit).to_pandas_dtype` are currently returning `dtype('<M8[ns]')` with nanosecond units regardless of the pyarrow units. Pandas has recently added support for non-nanosecond units so I believe pyarrow can now preserve the units here.
   
   ```
   >>> import pyarrow as pa
   
   >>> pa.timestamp("us").to_pandas_dtype()
   dtype('<M8[ns]')
   
   >>> pa.duration("ms").to_pandas_dtype()
   dtype('<m8[ns]')
   ```
   
   ### 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] AlenkaF closed issue #34462: [Python] Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF closed issue #34462: [Python] Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types
URL: https://github.com/apache/arrow/issues/34462


-- 
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


[GitHub] [arrow] AlenkaF commented on issue #34462: [Python] Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types

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

   This issue also came up after pandas implemented `__from_pyarrow__` support to `DatetimeTZDtype`. See:
   
   - https://github.com/apache/arrow/issues/35235
   - https://github.com/pandas-dev/pandas/issues/52782


-- 
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 #34462: [Python] Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types

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

   Related: https://github.com/apache/arrow/issues/33321 (for the actual data conversions)


-- 
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] AlenkaF commented on issue #34462: [Python] Support non-nanosecond units in method to_pandas_dtype for timestamp and duration types

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

   Duplicate of https://github.com/apache/arrow/issues/33321


-- 
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