We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd38f15 commit 96871c1Copy full SHA for 96871c1
pandas/core/construction.py
@@ -56,7 +56,7 @@
56
import pandas.core.common as com
57
58
if not pa_version_under10p1:
59
- import pyarrow as pa
+ pass
60
61
if TYPE_CHECKING:
62
from collections.abc import Sequence
@@ -554,11 +554,7 @@ def sanitize_array(
554
np.ndarray or ExtensionArray
555
"""
556
original_dtype = dtype
557
- if (
558
- not pa_version_under10p1
559
- and isinstance(data, (pa.ChunkedArray, pa.Array))
560
- and dtype is None
561
- ):
+ if not pa_version_under10p1 and lib.is_pyarrow_array(data) and dtype is None:
562
dtype = ArrowDtype(data.type)
563
564
if isinstance(data, ma.MaskedArray):
0 commit comments