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

Method test_error_sparse

python/pyarrow/tests/test_pandas.py:3311–3319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3309 assert table.column('B').type == pa.int32()
3310
3311 def test_error_sparse(self):
3312 # ARROW-2818
3313 try:
3314 df = pd.DataFrame({'a': pd.arrays.SparseArray([1, np.nan, 3])})
3315 except AttributeError:
3316 # pandas.arrays module introduced in pandas 0.24
3317 df = pd.DataFrame({'a': pd.SparseArray([1, np.nan, 3])})
3318 with pytest.raises(TypeError, match="Sparse pandas data"):
3319 pa.Table.from_pandas(df)
3320
3321
3322def test_safe_cast_from_float_with_nans_to_int():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected