jorisvandenbossche commented on a change in pull request #8887:
URL: https://github.com/apache/arrow/pull/8887#discussion_r544093795



##########
File path: python/pyarrow/tests/test_pandas.py
##########
@@ -4001,6 +4011,22 @@ def test_to_pandas_extension_dtypes_mapping():
     assert isinstance(result['a'].dtype, pd.PeriodDtype)
 
 
+def test_array_to_pandas():
+    if LooseVersion(pd.__version__) < "1.0":
+        pytest.skip("ExtensionDtype __from_arrow__ protocol missing")
+
+    for arr in [pd.period_range("2012-01-01", periods=3, freq="D").array,
+                pd.interval_range(1, 4).array]:
+        result = pa.array(arr).to_pandas()
+        expected = pd.Series(arr)
+        tm.assert_series_equal(result, expected)
+
+        # TODO implement proper conversion for chunked array
+        # result = pa.table({"col": arr})["col"].to_pandas()
+        # expected = pd.Series(arr, name="col")
+        # tm.assert_series_equal(result, expected)

Review comment:
       In any case, the feature was only added in pandas 1.1, not 1.0, so the 
skip I added was wrong. Fixing that in https://github.com/apache/arrow/pull/8934




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to