Skip to content

ENH/PERF: Remove frequency inference from .dt accessor #17210

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

Merged
merged 3 commits into from
Aug 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BENCH: Add DatetimeAccessor benchmark
  • Loading branch information
cpcloud committed Aug 12, 2017
commit 2bf5c960a3afea034968c3d1e938c175574bfa5a
14 changes: 14 additions & 0 deletions asv_bench/benchmarks/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,3 +510,17 @@ def time_begin_incr_rng(self):

def time_begin_decr_rng(self):
self.rng - self.semi_month_begin


class DatetimeAccessor(object):
def setup(self):
self.N = 100000
self.series = pd.Series(
pd.date_range(start='1/1/2000', periods=self.N, freq='T')
)

def time_dt_accessor(self):
self.series.dt

def time_dt_accessor_normalize(self):
self.series.dt.normalize()