itamarst commented on a change in pull request #7169:
URL: https://github.com/apache/arrow/pull/7169#discussion_r427331603



##########
File path: python/pyarrow/array.pxi
##########
@@ -549,6 +550,11 @@ cdef class _PandasConvertible:
             Cast integers with nulls to objects
         date_as_object : bool, default True
             Cast dates to objects. If False, convert to datetime64[ns] dtype.
+        timestamp_as_object : bool, default False
+            Cast non-nanosecond timestamps (np.datetime64) to objects. This is

Review comment:
       Hm. It's lossy if you do that, though, since `datetime` only supports 
microseconds. And the goal is more to deal with out-of-range timestamps, and 
returning object is more a side-effect of trying to do that.
   
   Actually, here's the argument against changing it: having multiple columns, 
some nanosecond, some not. If nanosecond gets downgraded to microsecond, you're 
forced to choice between losing data and not being able to access data. Whereas 
current default allows both accuracy and range.
   
   I'm not sure in practice how much that will occur.
   
   I can change it if you have a strong opinion in favor of making it always 
return objects.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to