Skip to content

Commit 5990aaa

Browse files
committed
COMPAT: pyarrow >= 0.7.0 compat
closes #17581
1 parent 0e85ca7 commit 5990aaa

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

ci/requirements-3.6_NUMPY_DEV.build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS numpy scipy
1414
# install dateutil from master
1515
pip install -U git+git://github.com/dateutil/dateutil.git
1616

17+
# install pyarrow daily
18+
conda install pyarrow -c twosigma
19+
1720
true

pandas/tests/io/test_parquet.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ def test_unsupported(self, pa):
302302
df = pd.DataFrame({'a': pd.period_range('2013', freq='M', periods=3)})
303303
self.check_error_on_write(df, pa, ValueError)
304304

305-
# categorical
306-
df = pd.DataFrame({'a': pd.Categorical(list('abc'))})
307-
self.check_error_on_write(df, pa, NotImplementedError)
308-
309305
# timedelta
310306
df = pd.DataFrame({'a': pd.timedelta_range('1 day',
311307
periods=3)})
@@ -315,6 +311,20 @@ def test_unsupported(self, pa):
315311
df = pd.DataFrame({'a': ['a', 1, 2.0]})
316312
self.check_error_on_write(df, pa, ValueError)
317313

314+
@pytest.mark.skip(pyarrow.__version__ < '0.7.0')
315+
def test_categorical(self, pa):
316+
317+
# supported in >= 0.7.0
318+
df = pd.DataFrame({'a': pd.Categorical(list('abc'))})
319+
self.check_round_trip(df, pa)
320+
321+
@pytest.mark.skip(pyarrow.__version__ >= '0.7.0')
322+
def test_categorical_unsupported(self, pa):
323+
324+
# supported in >= 0.7.0
325+
df = pd.DataFrame({'a': pd.Categorical(list('abc'))})
326+
self.check_error_on_write(df, pa, NotImplementedError)
327+
318328

319329
class TestParquetFastParquet(Base):
320330

0 commit comments

Comments
 (0)