From 383308934fff9baf6f754a8aac1da1a90107b7d3 Mon Sep 17 00:00:00 2001 From: Asaf Reich Date: Sun, 23 Oct 2022 18:48:29 -0400 Subject: [PATCH 1/2] first attempt --- pandas/tests/extension/test_arrow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 8979c145a223c..034842150a718 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -1364,3 +1364,9 @@ def test_pickle_roundtrip(data): result_sliced = pickle.loads(sliced_pickled) tm.assert_series_equal(result_sliced, expected_sliced) + +def test_repr_from_arrow_array(data, frame_or_series): + # GH 48238 + pa_array = pa.array([data[0], None]) + result = frame_or_series(pa_array, dtype=ArrowDtype(pa_array.type)) + repr(result) From 83f87761e58e39f3c9f93203dc9ac21eff16c76f Mon Sep 17 00:00:00 2001 From: Asaf Reich Date: Sun, 23 Oct 2022 20:30:31 -0400 Subject: [PATCH 2/2] black format --- pandas/tests/extension/test_arrow.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index 034842150a718..3706d90a0636a 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -1365,6 +1365,7 @@ def test_pickle_roundtrip(data): result_sliced = pickle.loads(sliced_pickled) tm.assert_series_equal(result_sliced, expected_sliced) + def test_repr_from_arrow_array(data, frame_or_series): # GH 48238 pa_array = pa.array([data[0], None])