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

[GitHub] [arrow] phofl opened a new issue, #34877: [Python] Roundtripping with ``from_pandas().to_pandas()`` changes timestamp/timedelta resolution

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

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   With pandas 2.0 we support more resolutions than nanosecond resolution. E.g. the following should preserve the reso:
   
   ```
   import pandas as pd
   import pyarrow as pa
   df = DataFrame({"a": [np.datetime64("2022-01-01")]}, dtype="datetime64[s]")
   result = pa.Table.from_pandas(df).to_pandas()
   result.dtypes
   ```
   
   ```
   a    datetime64[ns]
   dtype: object
   ```
   
   Expected:
   
   ```
   a    datetime64[s]
   dtype: object
   ```
   
   Tried on the latest nightly build
   
   ### 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] jorisvandenbossche commented on issue #34877: [Python] Roundtripping with ``from_pandas().to_pandas()`` changes timestamp/timedelta resolution

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

   Yes, this is known, historically we have hardcoded nanoseconds, which we can relax if pandas>=2 is installed.
   
   See https://github.com/apache/arrow/issues/33321, going to close this as a duplicate


-- 
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 #34877: [Python] Roundtripping with ``from_pandas().to_pandas()`` changes timestamp/timedelta resolution

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche closed issue #34877: [Python] Roundtripping with ``from_pandas().to_pandas()`` changes timestamp/timedelta resolution
URL: https://github.com/apache/arrow/issues/34877


-- 
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] jorisvandenbossche commented on issue #34877: [Python] Roundtripping with ``from_pandas().to_pandas()`` changes timestamp/timedelta resolution

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

   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