You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Anish Biswas (Jira)" <ji...@apache.org> on 2020/04/30 07:07:00 UTC

[jira] [Created] (ARROW-8642) Is there a good way to convert data types from numpy types to pyarrow DataType?

Anish Biswas created ARROW-8642:
-----------------------------------

             Summary: Is there a good way to convert data types from numpy types to pyarrow DataType?
                 Key: ARROW-8642
                 URL: https://issues.apache.org/jira/browse/ARROW-8642
             Project: Apache Arrow
          Issue Type: Wish
            Reporter: Anish Biswas


Pretty much what the title says. Suppose I have a numpy array and its a numpy.int8 type. How do I convert it to a pyarrow.Datatype intuitively? I thought a Dictionary lookup table might work but perhaps there is some better way?

Why do I need this? I am trying to make pyarrow arrays with from_buffers(). The first parameter is essentially a pyarrow.Datatype. So that's why. I have validity_bitmaps as a buffer of uint8 and that's why I am using from_buffers() and not pyarrow.array().



--
This message was sent by Atlassian Jira
(v8.3.4#803005)