[ 
https://issues.apache.org/jira/browse/ARROW-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833703#comment-16833703
 ] 

Joris Van den Bossche commented on ARROW-842:
---------------------------------------------

{{pd.NaT}} is one that is not recognized, but, only in lists / object dtype:

{code}
In [25]: pa.array([pd.Timestamp("2012-01-01"), pd.NaT, None, np.nan, 
float('nan')])                                                                  
         
Out[25]: 
<pyarrow.lib.TimestampArray object at 0x7f27703b82c8>
[
  1325376000000000,
  -62135596800000000,
  null,
  null,
  null
]
{code}

If you actually pass a pandas Series object with the proper dtype such as 
datetime64[ns], then those missing values are handled correctly:

{code}
In [32]: pa.array(pd.Series([pd.Timestamp("2012-01-01"), pd.NaT]))              
                                                                              
Out[32]: 
<pyarrow.lib.TimestampArray object at 0x7f2752662b38>
[
  1325376000000000000,
  null
]
{code}

> [Python] Handle more kinds of null sentinel objects from pandas 0.x
> -------------------------------------------------------------------
>
>                 Key: ARROW-842
>                 URL: https://issues.apache.org/jira/browse/ARROW-842
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Wes McKinney
>            Priority: Major
>
> Follow-on work to ARROW-707. See 
> https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/lib.pyx#L193 
> and discussion in https://github.com/apache/arrow/pull/554



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to