Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions python/pyarrow/tests/test_convert_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from collections import OrderedDict

import pytest
import datetime
import unittest
import decimal
Expand Down Expand Up @@ -412,6 +413,18 @@ def test_dates_from_integers(self):
assert a1[0].as_py() == expected
assert a2[0].as_py() == expected

@pytest.mark.xfail(reason="not supported ATM",
raises=NotImplementedError)
def test_timedelta(self):
# TODO(jreback): Pandas only support ns resolution
# Arrow supports ??? for resolution
df = pd.DataFrame({
'timedelta': np.arange(start=0, stop=3*86400000,
step=86400000,
dtype='timedelta64[ms]')
})
pa.Table.from_pandas(df)

def test_column_of_arrays(self):
df, schema = dataframe_with_arrays()
self._check_pandas_roundtrip(df, schema=schema, expected_schema=schema)
Expand Down
10 changes: 10 additions & 0 deletions python/pyarrow/tests/test_feather.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import os
import unittest
import pytest

from numpy.testing import assert_array_equal
import numpy as np
Expand Down Expand Up @@ -320,6 +321,15 @@ def test_timestamp_with_nulls(self):

self._check_pandas_roundtrip(df, null_counts=[1, 1])

@pytest.mark.xfail(reason="not supported ATM",
raises=NotImplementedError)
def test_timedelta_with_nulls(self):
df = pd.DataFrame({'test': [pd.Timedelta('1 day'),
None,
pd.Timedelta('3 day')]})

self._check_pandas_roundtrip(df, null_counts=[1, 1])

def test_out_of_float64_timestamp_with_nulls(self):
df = pd.DataFrame(
{'test': pd.DatetimeIndex([1451606400000000001,
Expand Down