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

Function test_map_labelled

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

Source from the content-addressed store, hash-verified

1252
1253
1254def test_map_labelled():
1255 # ARROW-13735
1256 t = pa.map_(pa.field("name", "string", nullable=False), "int64")
1257 arr = pa.array([[('a', 1), ('b', 2)], [('c', 3)]], type=t)
1258 assert arr.type.key_field == pa.field("name", pa.utf8(), nullable=False)
1259 assert arr.type.item_field == pa.field("value", pa.int64())
1260 assert len(arr) == 2
1261
1262
1263def test_map_from_dict():

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
fieldMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected