forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove property that re-computed microsecond (pandas-dev#17331)
- Loading branch information
1 parent
c877772
commit f8ce1ad
Showing
4 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from datetime import datetime, date, timedelta | ||
import operator | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters