We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
>>> import pandas as pd >>> s = pd.Series(pd.date_range('2013-05-01', '2013-05-03')) >>> s 0 2013-05-01 00:00:00 1 2013-05-02 00:00:00 2 2013-05-03 00:00:00 dtype: datetime64[ns] >>> s.clip_lower(s[1]) 0 2013-05-02 00:00:00 1 1367452800000000000 2 1367539200000000000 dtype: object >>> s.clip_lower(s[1].value) 0 2013-05-02 00:00:00 1 2013-05-02 00:00:00 2 2013-05-03 00:00:00 dtype: datetime64[ns] >>> print pd.__version__ 0.11.1.dev-f1a3226
Any reason not to implement clip_lower and clip_upper with Series.where rather than np.where? It solves this problem.
The text was updated successfully, but these errors were encountered:
yes....Serise.where knows how to deal with datetime64[ns] and NaT so that would be a good change
Serise.where
datetime64[ns]
NaT
if you want to do a PR, pls add a test for this (and see that existing tests pass)
thanks!
Sorry, something went wrong.
value=None
Successfully merging a pull request may close this issue.
Any reason not to implement clip_lower and clip_upper with Series.where rather than np.where? It solves this problem.
The text was updated successfully, but these errors were encountered: