File tree 3 files changed +27
-6
lines changed
3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1
- from .pandas_vb_common import *
2
- from pandas import to_timedelta , Timestamp
1
+ import numpy as np
2
+ import pandas as pd
3
+
4
+ from pandas import to_timedelta , Timestamp , Timedelta
3
5
4
6
5
7
class ToTimedelta (object ):
@@ -67,8 +69,8 @@ class DatetimeAccessor(object):
67
69
def setup (self ):
68
70
self .N = 100000
69
71
self .series = pd .Series (
70
- pd .timedelta_range ('1 days' , periods = self .N , freq = 'h' )
71
- )
72
+ pd .timedelta_range ('1 days' , periods = self .N , freq = 'h' ))
73
+
72
74
def time_dt_accessor (self ):
73
75
self .series .dt
74
76
Original file line number Diff line number Diff line change 1
- from pandas import to_timedelta , Timestamp
1
+ from pandas import Timestamp
2
2
import pytz
3
3
import datetime
4
4
5
5
6
+ class TimestampConstruction (object ):
7
+ # TODO: classmethod constructors: fromordinal, fromtimestamp...
8
+
9
+ def time_parse_iso8601_no_tz (self ):
10
+ Timestamp ('2017-08-25 08:16:14' )
11
+
12
+ def time_parse_iso8601_tz (self ):
13
+ Timestamp ('2017-08-25 08:16:14-0500' )
14
+
15
+ def time_parse_dateutil (self ):
16
+ Timestamp ('2017/08/25 08:16:14 AM' )
17
+
18
+ def time_parse_today (self ):
19
+ Timestamp ('today' )
20
+
21
+ def time_parse_now (self ):
22
+ Timestamp ('now' )
23
+
24
+
6
25
class TimestampProperties (object ):
7
26
goal_time = 0.2
8
27
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ if [ "$LINT" ]; then
24
24
echo " Linting setup.py DONE"
25
25
26
26
echo " Linting asv_bench/benchmarks/"
27
- flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/[ghijoprst ]* .py --ignore=F811
27
+ flake8 asv_bench/benchmarks/ --exclude=asv_bench/benchmarks/[ghijoprs ]* .py --ignore=F811
28
28
if [ $? -ne " 0" ]; then
29
29
RET=1
30
30
fi
You can’t perform that action at this time.
0 commit comments