Skip to content

DOC: Exception in timeseries due to int64 __floordiv__ #20518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomAugspurger opened this issue Mar 28, 2018 · 1 comment
Closed

DOC: Exception in timeseries due to int64 __floordiv__ #20518

TomAugspurger opened this issue Mar 28, 2018 · 1 comment
Labels

Comments

@TomAugspurger
Copy link
Contributor

http://pandas-docs.github.io/pandas-docs-travis/timeseries.html#from-timestamps-to-epoch

In [3]: stamps = pd.date_range('2012-10-08 18:15:05', periods=4, freq='D')
   ...: stamps.view('int64') // pd.Timedelta(1, unit='s')
   ...:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-e2a3bb41d0d7> in <module>()
      1 stamps = pd.date_range('2012-10-08 18:15:05', periods=4, freq='D')
----> 2 stamps.view('int64') // pd.Timedelta(1, unit='s')

~/sandbox/pandas-ip/pandas/pandas/_libs/tslibs/timedeltas.pyx in pandas._libs.tslibs.timedeltas.Timedelta.__rfloordiv__()
   1189                 # also timedelta-like
   1190                 return _broadcast_floordiv_td64(self.value, other, _rfloordiv)
-> 1191             raise TypeError('Invalid dtype {dtype} for '
   1192                             '{op}'.format(dtype=other.dtype,
   1193                                           op='__floordiv__'))

TypeError: Invalid dtype int64 for __floordiv__
@TomAugspurger
Copy link
Contributor Author

Whoops, dupe of #19761

@TomAugspurger TomAugspurger added this to the No action milestone Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant