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

Function test_cast_timestamp_to_int

python/pyarrow/tests/test_array.py:2291–2297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2289
2290@pytest.mark.numpy
2291def test_cast_timestamp_to_int():
2292 arr = pa.array(np.array([0, 1, 2], dtype='int64'),
2293 type=pa.timestamp('us'))
2294 expected = pa.array([0, 1, 2], type='i8')
2295
2296 result = arr.cast('i8')
2297 assert result.equals(expected)
2298
2299
2300def test_cast_date32_to_int():

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
arrayMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected