Skip to content

Commit 14035c5

Browse files
committed
Merge branch 'master' into excel_style
2 parents 3071bac + e082eb2 commit 14035c5

File tree

412 files changed

+17926
-19984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+17926
-19984
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ doc/build/html/index.html
104104
# Windows specific leftover:
105105
doc/tmp.sv
106106
doc/source/styled.xlsx
107+
doc/source/templates/

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ global-exclude *.png
2525
# recursive-include LICENSES *
2626
include versioneer.py
2727
include pandas/_version.py
28+
include pandas/io/formats/templates/*.tpl

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// The Pythons you'd like to test against. If not provided, defaults
2727
// to the current version of Python used to run `asv`.
2828
// "pythons": ["2.7", "3.4"],
29-
"pythons": ["2.7"],
29+
"pythons": ["3.6"],
3030

3131
// The matrix of dependencies to test. Each key is the name of a
3232
// package (in PyPI) and the values are version numbers. An empty

asv_bench/benchmarks/algorithms.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import pandas as pd
33
from pandas.util import testing as tm
44

5+
try:
6+
from pandas.tools.hashing import hash_pandas_object
7+
except ImportError:
8+
pass
9+
510

611
class Algorithms(object):
712
goal_time = 0.2
@@ -103,13 +108,13 @@ def setup(self):
103108
self.df.iloc[10:20] = np.nan
104109

105110
def time_frame(self):
106-
self.df.hash()
111+
hash_pandas_object(self.df)
107112

108113
def time_series_int(self):
109-
self.df.E.hash()
114+
hash_pandas_object(self.df.E)
110115

111116
def time_series_string(self):
112-
self.df.B.hash()
117+
hash_pandas_object(self.df.B)
113118

114119
def time_series_categorical(self):
115-
self.df.C.hash()
120+
hash_pandas_object(self.df.C)

asv_bench/benchmarks/binary_ops.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from .pandas_vb_common import *
2-
import pandas.computation.expressions as expr
2+
try:
3+
import pandas.core.computation.expressions as expr
4+
except ImportError:
5+
import pandas.computation.expressions as expr
36

47

58
class Ops(object):

asv_bench/benchmarks/categoricals.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
from .pandas_vb_common import *
22
try:
3-
from pandas.types.concat import union_categoricals
3+
from pandas.api.types import union_categoricals
44
except ImportError:
5-
pass
5+
try:
6+
from pandas.types.concat import union_categoricals
7+
except ImportError:
8+
pass
69

710

811
class Categoricals(object):

asv_bench/benchmarks/eval.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from .pandas_vb_common import *
22
import pandas as pd
3-
import pandas.computation.expressions as expr
3+
try:
4+
import pandas.core.computation.expressions as expr
5+
except ImportError:
6+
import pandas.computation.expressions as expr
47

58

69
class Eval(object):

asv_bench/benchmarks/frame_ctor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ def setup(self):
2020
self.data = self.frame.to_dict()
2121
except:
2222
self.data = self.frame.toDict()
23-
self.some_dict = self.data.values()[0]
23+
self.some_dict = list(self.data.values())[0]
2424
self.dict_list = [dict(zip(self.columns, row)) for row in self.frame.values]
2525

2626
self.data2 = dict(
2727
((i, dict(((j, float(j)) for j in range(100)))) for i in
28-
xrange(2000)))
28+
range(2000)))
2929

3030
def time_frame_ctor_list_of_dict(self):
3131
DataFrame(self.dict_list)

asv_bench/benchmarks/frame_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def time_reindex_both_axes_ix(self):
5656
self.df.ix[(self.idx, self.idx)]
5757

5858
def time_reindex_upcast(self):
59-
self.df2.reindex(permutation(range(1200)))
59+
self.df2.reindex(np.random.permutation(range(1200)))
6060

6161

6262
#----------------------------------------------------------------------
@@ -583,7 +583,7 @@ class frame_assign_timeseries_index(object):
583583
goal_time = 0.2
584584

585585
def setup(self):
586-
self.idx = date_range('1/1/2000', periods=100000, freq='D')
586+
self.idx = date_range('1/1/2000', periods=100000, freq='H')
587587
self.df = DataFrame(randn(100000, 1), columns=['A'], index=self.idx)
588588

589589
def time_frame_assign_timeseries_index(self):

asv_bench/benchmarks/gil.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
from .pandas_vb_common import *
2-
from pandas.core import common as com
2+
3+
from pandas.core.algorithms import take_1d
34

45
try:
56
from cStringIO import StringIO
67
except ImportError:
78
from io import StringIO
89

10+
try:
11+
from pandas._libs import algos
12+
except ImportError:
13+
from pandas import algos
14+
915
try:
1016
from pandas.util.testing import test_parallel
1117

@@ -167,11 +173,11 @@ def time_nogil_take1d_float64(self):
167173

168174
@test_parallel(num_threads=2)
169175
def take_1d_pg2_int64(self):
170-
com.take_1d(self.df.int64.values, self.indexer)
176+
take_1d(self.df.int64.values, self.indexer)
171177

172178
@test_parallel(num_threads=2)
173179
def take_1d_pg2_float64(self):
174-
com.take_1d(self.df.float64.values, self.indexer)
180+
take_1d(self.df.float64.values, self.indexer)
175181

176182

177183
class nogil_take1d_int64(object):
@@ -193,11 +199,11 @@ def time_nogil_take1d_int64(self):
193199

194200
@test_parallel(num_threads=2)
195201
def take_1d_pg2_int64(self):
196-
com.take_1d(self.df.int64.values, self.indexer)
202+
take_1d(self.df.int64.values, self.indexer)
197203

198204
@test_parallel(num_threads=2)
199205
def take_1d_pg2_float64(self):
200-
com.take_1d(self.df.float64.values, self.indexer)
206+
take_1d(self.df.float64.values, self.indexer)
201207

202208

203209
class nogil_kth_smallest(object):
@@ -226,7 +232,7 @@ class nogil_datetime_fields(object):
226232

227233
def setup(self):
228234
self.N = 100000000
229-
self.dti = pd.date_range('1900-01-01', periods=self.N, freq='D')
235+
self.dti = pd.date_range('1900-01-01', periods=self.N, freq='T')
230236
self.period = self.dti.to_period('D')
231237
if (not have_real_test_parallel):
232238
raise NotImplementedError

0 commit comments

Comments
 (0)