forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimestamp.py
60 lines (40 loc) · 1.19 KB
/
timestamp.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
57
58
59
60
from .pandas_vb_common import *
from pandas import to_timedelta, Timestamp
class TimestampProperties(object):
goal_time = 0.2
def setup(self):
self.ts = Timestamp('2017-08-25 08:16:14')
def time_tz(self):
self.ts.tz
def time_offset(self):
self.ts.offset
def time_dayofweek(self):
self.ts.dayofweek
def time_weekday_name(self):
self.ts.weekday_name
def time_dayofyear(self):
self.ts.dayofyear
def time_week(self):
self.ts.week
def time_quarter(self):
self.ts.quarter
def time_days_in_month(self):
self.ts.days_in_month
def time_freqstr(self):
self.ts.freqstr
def time_is_month_start(self):
self.ts.is_month_start
def time_is_month_end(self):
self.ts.is_month_end
def time_is_quarter_start(self):
self.ts.is_quarter_start
def time_is_quarter_end(self):
self.ts.is_quarter_end
def time_is_year_start(self):
self.ts.is_quarter_end
def time_is_year_end(self):
self.ts.is_quarter_end
def time_is_leap_year(self):
self.ts.is_quarter_end
def time_microsecond(self):
self.ts.microsecond