Skip to content

Commit 799f09a

Browse files
committed
filter warning
1 parent 9888489 commit 799f09a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/core/arrays/arrow/array.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,13 @@ def _to_numpy_and_type(value) -> tuple[np.ndarray, pa.DataType | None]:
25372537
pa_type = value.type
25382538
elif isinstance(value, pa.Scalar):
25392539
pa_type = value.type
2540-
value = value.as_py()
2540+
with warnings.catch_warnings():
2541+
warnings.filterwarnings(
2542+
"ignore",
2543+
"The 'unit' keyword is deprecated",
2544+
Pandas4Warning,
2545+
)
2546+
value = value.as_py()
25412547
else:
25422548
pa_type = None
25432549
return np.array(value, dtype=object), pa_type

0 commit comments

Comments
 (0)