File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -955,6 +955,8 @@ Getting scalar results from a ``timedelta64[ns]`` series
955
955
y = s - s[0 ]
956
956
y
957
957
958
+ .. code-block :: python
959
+
958
960
if LooseVersion(np.__version__ ) <= ' 1.6.2' :
959
961
y.apply(lambda x : x.item().total_seconds())
960
962
y.apply(lambda x : x.item().days)
@@ -982,7 +984,7 @@ Series of timedeltas with ``NaT`` values are supported
982
984
y = s - s.shift()
983
985
y
984
986
985
- The can be set to ``NaT `` using ``np.nan `` analagously to datetimes
987
+ Elements can be set to ``NaT `` using ``np.nan `` analagously to datetimes
986
988
987
989
.. ipython :: python
988
990
@@ -1003,7 +1005,7 @@ Some timedelta numeric like operations are supported.
1003
1005
1004
1006
td - timedelta(minutes = 5 , seconds = 5 , microseconds = 5 )
1005
1007
1006
- ``min, max `` and the corresponding ``idxmin, idxmax `` operations are support on frames
1008
+ ``min, max `` and the corresponding ``idxmin, idxmax `` operations are supported on frames
1007
1009
1008
1010
.. ipython :: python
1009
1011
@@ -1019,7 +1021,7 @@ Some timedelta numeric like operations are supported.
1019
1021
df.idxmin()
1020
1022
df.idxmax()
1021
1023
1022
- ``min, max `` operations are support on series, these return a single element
1024
+ ``min, max `` operations are supported on series; these return a single element
1023
1025
``timedelta64[ns] `` Series (this avoids having to deal with numpy timedelta64
1024
1026
issues). ``idxmin, idxmax `` are supported as well.
1025
1027
You can’t perform that action at this time.
0 commit comments