@@ -302,10 +302,6 @@ def test_unsupported(self, pa):
302
302
df = pd .DataFrame ({'a' : pd .period_range ('2013' , freq = 'M' , periods = 3 )})
303
303
self .check_error_on_write (df , pa , ValueError )
304
304
305
- # categorical
306
- df = pd .DataFrame ({'a' : pd .Categorical (list ('abc' ))})
307
- self .check_error_on_write (df , pa , NotImplementedError )
308
-
309
305
# timedelta
310
306
df = pd .DataFrame ({'a' : pd .timedelta_range ('1 day' ,
311
307
periods = 3 )})
@@ -315,6 +311,20 @@ def test_unsupported(self, pa):
315
311
df = pd .DataFrame ({'a' : ['a' , 1 , 2.0 ]})
316
312
self .check_error_on_write (df , pa , ValueError )
317
313
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
+
318
328
319
329
class TestParquetFastParquet (Base ):
320
330
0 commit comments