Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0.0
Description
Example
>>> a = pa.DictionaryArray.from_arrays(pa.array([0, 1, None, 0], type=pa.int32()), pa.array(['foo', 'bar'])) >>> a <pyarrow.lib.DictionaryArray object at 0x7f12fc94ccf0>-- dictionary: [ "foo", "bar" ] -- indices: [ 0, 1, null, 0 ] >>> a.to_pandas() # this works 0 foo 1 bar 2 NaN 3 foo dtype: category Categories (2, object): [foo, bar] >>> a.to_numpy(zero_copy_only=False) # this is broken array(['foo', 'bar', 'bar', 'foo'], dtype=object)
Attachments
Issue Links
- links to