You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Phillip Cloud (Jira)" <ji...@apache.org> on 2022/07/08 16:17:00 UTC
[jira] [Created] (ARROW-17018) Timedelta dtype metadata base unit is globally mutated by the Table.to_pandas() method
Phillip Cloud created ARROW-17018:
-------------------------------------
Summary: Timedelta dtype metadata base unit is globally mutated by the Table.to_pandas() method
Key: ARROW-17018
URL: https://issues.apache.org/jira/browse/ARROW-17018
Project: Apache Arrow
Issue Type: Bug
Components: C++, Python
Affects Versions: 8.0.0
Reporter: Phillip Cloud
Fix For: 9.0.0
Here's a failing test case to demonstrate the issue:
{code}
def test_mutates_dtype():
import pyarrow as pa
expected = np.dtype('<m8')
assert np.dtype(np.timedelta64) == expected
df = pd.DataFrame({"a": [np.timedelta64()]})
t = pa.Table.from_pandas(df)
t.to_pandas()
assert np.dtype(np.timedelta64) == expected
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)