Skip to content

Commit dd6ffa3

Browse files
committed
ENH: Series.resample performance with datetime64[ns] #7754
1 parent 3128215 commit dd6ffa3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/source/whatsnew/v0.16.1.txt

+1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ Performance Improvements
215215
- Improved csv write performance with mixed dtypes, including datetimes by up to 5x (:issue:`9940`)
216216
- Improved csv write performance generally by 2x (:issue:`9940`)
217217
- Improved the performance of ``pd.lib.max_len_string_array`` by 5-7x (:issue:`10024`)
218+
- Improved ``Series.resample`` performance with dtype=datetime64[ns] (:issue:`7754`)
218219

219220

220221

pandas/core/groupby.py

+2
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,8 @@ def aggregate(self, values, how, axis=0):
14931493

14941494
if is_datetime_or_timedelta_dtype(values.dtype):
14951495
values = values.view('int64')
1496+
# GH 7754
1497+
is_numeric = True
14961498
elif is_bool_dtype(values.dtype):
14971499
values = _algos.ensure_float64(values)
14981500
elif com.is_integer_dtype(values):

0 commit comments

Comments
 (0)