MCPcopy Create free account
hub / github.com/apache/arrow / _check_series_roundtrip

Function _check_series_roundtrip

python/pyarrow/tests/test_pandas.py:131–141  ·  view source on GitHub ↗
(s, type_=None, expected_pa_type=None)

Source from the content-addressed store, hash-verified

129
130
131def _check_series_roundtrip(s, type_=None, expected_pa_type=None):
132 arr = pa.array(s, from_pandas=True, type=type_)
133
134 if type_ is not None and expected_pa_type is None:
135 expected_pa_type = type_
136
137 if expected_pa_type is not None:
138 assert arr.type == expected_pa_type
139
140 result = pd.Series(arr.to_pandas(), name=s.name)
141 tm.assert_series_equal(s, result)
142
143
144def _check_array_roundtrip(values, expected=None, mask=None,

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected