-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Description
>>> 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.
Metadata
Metadata
Assignees
Labels
No labels