Skip to content

Commit 16a5297

Browse files
authored
Merge branch 'master' into fixturize_frame_tests_1
2 parents 733b889 + 2f1b842 commit 16a5297

Some content is hidden

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

63 files changed

+749
-254
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
<tr>
5757
<td></td>
5858
<td>
59-
<a href="https://ci.appveyor.com/project/pandas-dev/pandas">
60-
<img src="https://ci.appveyor.com/api/projects/status/86vn83mxgnl4xf1s/branch/master?svg=true" alt="appveyor build status" />
59+
<a href="https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=master">
60+
<img src="https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=master" alt="Azure Pipelines build status" />
6161
</a>
6262
</td>
6363
</tr>

asv_bench/benchmarks/algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
try:
1010
hashing = import_module(imp)
1111
break
12-
except:
12+
except (ImportError, TypeError, ValueError):
1313
pass
1414

1515
from .pandas_vb_common import setup # noqa

asv_bench/benchmarks/frame_methods.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,21 @@ class NSort(object):
505505
param_names = ['keep']
506506

507507
def setup(self, keep):
508-
self.df = DataFrame(np.random.randn(1000, 3), columns=list('ABC'))
508+
self.df = DataFrame(np.random.randn(100000, 3),
509+
columns=list('ABC'))
509510

510-
def time_nlargest(self, keep):
511+
def time_nlargest_one_column(self, keep):
511512
self.df.nlargest(100, 'A', keep=keep)
512513

513-
def time_nsmallest(self, keep):
514+
def time_nlargest_two_columns(self, keep):
515+
self.df.nlargest(100, ['A', 'B'], keep=keep)
516+
517+
def time_nsmallest_one_column(self, keep):
514518
self.df.nsmallest(100, 'A', keep=keep)
515519

520+
def time_nsmallest_two_columns(self, keep):
521+
self.df.nsmallest(100, ['A', 'B'], keep=keep)
522+
516523

517524
class Describe(object):
518525

asv_bench/benchmarks/io/csv.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import random
2-
import timeit
32
import string
43

54
import numpy as np
65
import pandas.util.testing as tm
76
from pandas import DataFrame, Categorical, date_range, read_csv
8-
from pandas.compat import PY2
97
from pandas.compat import cStringIO as StringIO
108

119
from ..pandas_vb_common import setup, BaseIO # noqa
@@ -181,8 +179,8 @@ def time_read_csv(self, sep, decimal, float_precision):
181179
names=list('abc'), float_precision=float_precision)
182180

183181
def time_read_csv_python_engine(self, sep, decimal, float_precision):
184-
read_csv(self.data(self.StringIO_input), sep=sep, header=None, engine='python',
185-
float_precision=None, names=list('abc'))
182+
read_csv(self.data(self.StringIO_input), sep=sep, header=None,
183+
engine='python', float_precision=None, names=list('abc'))
186184

187185

188186
class ReadCSVCategorical(BaseIO):

asv_bench/benchmarks/join_merge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def setup(self):
2929
try:
3030
with warnings.catch_warnings(record=True):
3131
self.mdf1.consolidate(inplace=True)
32-
except:
32+
except (AttributeError, TypeError):
3333
pass
3434
self.mdf2 = self.mdf1.copy()
3535
self.mdf2.index = self.df2.index

asv_bench/benchmarks/pandas_vb_common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
from importlib import import_module
33

44
import numpy as np
5-
from pandas import Panel
65

76
# Compatibility import for lib
87
for imp in ['pandas._libs.lib', 'pandas.lib']:
98
try:
109
lib = import_module(imp)
1110
break
12-
except:
11+
except (ImportError, TypeError, ValueError):
1312
pass
1413

1514
numeric_dtypes = [np.int64, np.int32, np.uint32, np.uint64, np.float32,
@@ -34,7 +33,7 @@ def remove(self, f):
3433
"""Remove created files"""
3534
try:
3635
os.remove(f)
37-
except:
36+
except OSError:
3837
# On Windows, attempting to remove a file that is in use
3938
# causes an exception to be raised
4039
pass

asv_bench/benchmarks/stat_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def setup(self, op, dtype, axis, use_bottleneck):
1818
df = pd.DataFrame(np.random.randn(100000, 4)).astype(dtype)
1919
try:
2020
pd.options.compute.use_bottleneck = use_bottleneck
21-
except:
21+
except TypeError:
2222
from pandas.core import nanops
2323
nanops._USE_BOTTLENECK = use_bottleneck
2424
self.df_func = getattr(df, op)
@@ -56,7 +56,7 @@ def setup(self, op, dtype, use_bottleneck):
5656
s = pd.Series(np.random.randn(100000)).astype(dtype)
5757
try:
5858
pd.options.compute.use_bottleneck = use_bottleneck
59-
except:
59+
except TypeError:
6060
from pandas.core import nanops
6161
nanops._USE_BOTTLENECK = use_bottleneck
6262
self.s_func = getattr(s, op)

asv_bench/benchmarks/timeseries.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import warnings
21
from datetime import timedelta
32

43
import numpy as np

ci/doctests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ "$DOCTEST" ]; then
2121

2222
# DataFrame / Series docstrings
2323
pytest --doctest-modules -v pandas/core/frame.py \
24-
-k"-axes -combine -isin -itertuples -join -nlargest -nsmallest -nunique -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack -to_dict -to_stata"
24+
-k"-axes -combine -itertuples -join -nlargest -nsmallest -nunique -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack -to_dict -to_stata"
2525

2626
if [ $? -ne "0" ]; then
2727
RET=1

ci/requirements-optional-pip.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lxml
1414
matplotlib
1515
nbsphinx
1616
numexpr
17-
openpyxl=2.5.5
17+
openpyxl==2.5.5
1818
pyarrow
1919
pymysql
2020
tables
@@ -28,4 +28,4 @@ statsmodels
2828
xarray
2929
xlrd
3030
xlsxwriter
31-
xlwt
31+
xlwt

0 commit comments

Comments
 (0)