File: plotting.py

package info (click to toggle)
pandas 0.13.1-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 48,044 kB
  • sloc: python: 115,757; ansic: 11,490; sh: 311; makefile: 120
file content (25 lines) | stat: -rw-r--r-- 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from vbench.benchmark import Benchmark
from datetime import datetime

common_setup = """from pandas_vb_common import *

try:
    from pandas import date_range
except ImportError:
    def date_range(start=None, end=None, periods=None, freq=None):
        return DateRange(start, end, periods=periods, offset=freq)

"""

#-----------------------------------------------------------------------------
# Timeseries plotting

setup = common_setup + """
N = 2000
M = 5
df = DataFrame(np.random.randn(N,M), index=date_range('1/1/1975', periods=N))
"""

plot_timeseries_period = Benchmark("df.plot()", setup=setup, 
                                   name='plot_timeseries_period')