forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpanel_methods.py
56 lines (36 loc) · 1.51 KB
/
panel_methods.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from .pandas_vb_common import *
class panel_pct_change_items(object):
goal_time = 0.2
def setup(self):
self.index = date_range(start='2000', freq='D', periods=1000)
self.panel = Panel(np.random.randn(100, len(self.index), 1000))
def time_panel_pct_change_items(self):
self.panel.pct_change(1, axis='items')
class panel_pct_change_major(object):
goal_time = 0.2
def setup(self):
self.index = date_range(start='2000', freq='D', periods=1000)
self.panel = Panel(np.random.randn(100, len(self.index), 1000))
def time_panel_pct_change_major(self):
self.panel.pct_change(1, axis='major')
class panel_pct_change_minor(object):
goal_time = 0.2
def setup(self):
self.index = date_range(start='2000', freq='D', periods=1000)
self.panel = Panel(np.random.randn(100, len(self.index), 1000))
def time_panel_pct_change_minor(self):
self.panel.pct_change(1, axis='minor')
class panel_shift(object):
goal_time = 0.2
def setup(self):
self.index = date_range(start='2000', freq='D', periods=1000)
self.panel = Panel(np.random.randn(100, len(self.index), 1000))
def time_panel_shift(self):
self.panel.shift(1)
class panel_shift_minor(object):
goal_time = 0.2
def setup(self):
self.index = date_range(start='2000', freq='D', periods=1000)
self.panel = Panel(np.random.randn(100, len(self.index), 1000))
def time_panel_shift_minor(self):
self.panel.shift(1, axis='minor')