Skip to content

Commit

Permalink
Fix timestamp corruption with pyarrow 13 and over (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper authored Jul 2, 2024
1 parent d7ccb94 commit 5490b1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clients/py/v3io_frames/pbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ def series2col_with_dtype(s, name, dtype):
elif dtype == fpb.TIME:
s = pd.to_datetime(s, utc=True)
s = s.dt.tz_convert('UTC')
kw['times'] = s.astype(np.int64)
# ML-6855: this results in nanoseconds regardless of datetime granularity, unlike s.astype(np.int64)
kw['times'] = s.apply(lambda x: x.value)
kw['dtype'] = fpb.TIME
elif dtype == fpb.NULL:
kw['dtype'] = fpb.NULL
Expand Down

0 comments on commit 5490b1e

Please sign in to comment.