Skip to content

Commit

Permalink
VB: set PeriodIndex as DataFrame column
Browse files Browse the repository at this point in the history
  • Loading branch information
changhiskhan authored and wesm committed Nov 23, 2012
1 parent eb00827 commit 2b06aa2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vb_suite/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,14 @@ def date_range(start=None, end=None, periods=None, freq=None):

timeseries_infer_freq = \
Benchmark('infer_freq(a)', setup, start_date=datetime(2012, 7, 1))

# setitem PeriodIndex

setup = common_setup + """
rng = period_range('1/1/1990', freq='S', periods=100000)
df = DataFrame(index=range(len(rng)))
"""

period_setitem = \
Benchmark("df['col'] = rng", setup,
start_date=datetime(2012, 8, 1))

0 comments on commit 2b06aa2

Please sign in to comment.