Timestamp .round precision for ns (original) (raw)

xref https://github.com/pandas-dev/pandas/pull/15568/files#r104304074

In [7]: pd.DatetimeIndex(['2016-10-17 12:00:00.0015']).round('ns')
Out[7]: DatetimeIndex(['2016-10-17 12:00:00.001499904'], dtype='datetime64[ns]', freq=None)

This is the unfortunate problem of converting from int64->float64->int64. I am not sure there is an easy way to fix this. We could: