Skip to content

Commit a86be66

Browse files
dmarsh19jorisvandenbossche
authored andcommitted
ARROW-10260: [Python] Missing MapType in to_pandas_dtype()
Closes apache#8422 from dmarsh19/missing-maptype-to-pandas Lead-authored-by: Derek Marsh <dmarsh19@users.noreply.github.com> Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
1 parent d8af4fa commit a86be66

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎python/pyarrow/tests/test_schema.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test_type_to_pandas_dtype():
7070
(pa.string(), np.object_),
7171
(pa.list_(pa.int8()), np.object_),
7272
# (pa.list_(pa.int8(), 2), np.object_), # TODO needs pandas conversion
73+
(pa.map_(pa.int64(), pa.float64()), np.object_),
7374
]
7475
for arrow_type, numpy_type in cases:
7576
assert arrow_type.to_pandas_dtype() == numpy_type

‎python/pyarrow/types.pxi‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ cdef dict _pandas_type_map = {
4747
_Type_STRING: np.object_,
4848
_Type_LIST: np.object_,
4949
_Type_DECIMAL: np.object_,
50+
_Type_MAP: np.object_,
5051
}
5152

5253
cdef dict _pep3118_type_map = {

0 commit comments

Comments
 (0)