diff --git a/pandas/core/arrays/arrow/array.py b/pandas/core/arrays/arrow/array.py index 8e1774c1ea45e..8e6b9db0fe7d4 100644 --- a/pandas/core/arrays/arrow/array.py +++ b/pandas/core/arrays/arrow/array.py @@ -1945,6 +1945,10 @@ def _str_wrap(self, width, **kwargs): "str.wrap not supported with pd.ArrowDtype(pa.string())." ) + @property + def _dt_year(self): + return type(self)(pc.year(self._data)) + @property def _dt_day(self): return type(self)(pc.day(self._data)) diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index d7543173a25ce..28919f496384c 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -2109,6 +2109,7 @@ def test_unsupported_dt(data): @pytest.mark.parametrize( "prop, expected", [ + ["year", 2023], ["day", 2], ["day_of_week", 0], ["dayofweek", 0],