Skip to content

Commit 8badfd5

Browse files
mroeschkejreback
authored andcommitted
CLN: ASV Timestamp (pandas-dev#19164)
1 parent fabc316 commit 8badfd5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

asv_bench/benchmarks/timestamp.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import datetime
2+
13
from pandas import Timestamp
24
import pytz
3-
import datetime
45

56

67
class TimestampConstruction(object):
7-
# TODO: classmethod constructors: fromordinal, fromtimestamp...
88

99
def time_parse_iso8601_no_tz(self):
1010
Timestamp('2017-08-25 08:16:14')
@@ -21,6 +21,12 @@ def time_parse_today(self):
2121
def time_parse_now(self):
2222
Timestamp('now')
2323

24+
def time_fromordinal(self):
25+
Timestamp.fromordinal(730120)
26+
27+
def time_fromtimestamp(self):
28+
Timestamp.fromtimestamp(1515448538)
29+
2430

2531
class TimestampProperties(object):
2632
goal_time = 0.2

0 commit comments

Comments
 (0)