Skip to content

Commit a4e8d38

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pivot
* upstream/master: (55 commits) PERF: Improve performance of StataReader (pandas-dev#25780) Speed up tokenizing of a row in csv and xstrtod parsing (pandas-dev#25784) BUG: Fix _binop for operators for serials which has more than one returns (divmod/rdivmod). (pandas-dev#25588) BUG-24971 copying blocks also considers ndim (pandas-dev#25521) CLN: Panel reference from documentation (pandas-dev#25649) ENH: Quoting column names containing spaces with backticks to use them in query and eval. (pandas-dev#24955) BUG: reading windows utf8 filenames in py3.6 (pandas-dev#25769) DOC: clean bug fix section in whatsnew (pandas-dev#25792) DOC: Fixed PeriodArray api ref (pandas-dev#25526) Move locale code out of tm, into _config (pandas-dev#25757) Unpin pycodestyle (pandas-dev#25789) Add test for rdivmod on EA array (GH23287) (pandas-dev#24047) ENH: Support datetime.timezone objects (pandas-dev#25065) Cython language level 3 (pandas-dev#24538) API: concat on sparse values (pandas-dev#25719) TST: assert_produces_warning works with filterwarnings (pandas-dev#25721) make core.config self-contained (pandas-dev#25613) CLN: replace %s syntax with .format in pandas.io.parsers (pandas-dev#24721) TST: Check pytables<3.5.1 when skipping (pandas-dev#25773) DOC: Fix typo in docstring of DataFrame.memory_usage (pandas-dev#25770) ...
2 parents 0c25bba + 85c3f82 commit a4e8d38

File tree

167 files changed

+1777
-2053
lines changed

Some content is hidden

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

167 files changed

+1777
-2053
lines changed

.travis.yml

-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
sudo: false
22
language: python
3-
# Default Python version is usually 2.7
43
python: 3.5
54

65
# To turn off cached cython files and compiler cache
@@ -36,14 +35,6 @@ matrix:
3635
env:
3736
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
3837

39-
- dist: trusty
40-
env:
41-
- JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="(not slow or (single and db))"
42-
addons:
43-
apt:
44-
packages:
45-
- python-gtk2
46-
4738
- dist: trusty
4839
env:
4940
- JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pip install pandas
166166
## Dependencies
167167
- [NumPy](https://www.numpy.org): 1.12.0 or higher
168168
- [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher
169-
- [pytz](https://pythonhosted.org/pytz): 2011k or higher
169+
- [pytz](https://pythonhosted.org/pytz): 2015.4 or higher
170170

171171
See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies)
172172
for recommended and optional dependencies.

asv_bench/benchmarks/indexing.py

+1-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
import pandas.util.testing as tm
5-
from pandas import (Series, DataFrame, Panel, MultiIndex,
5+
from pandas import (Series, DataFrame, MultiIndex,
66
Int64Index, UInt64Index, Float64Index,
77
IntervalIndex, CategoricalIndex,
88
IndexSlice, concat, date_range)
@@ -277,18 +277,6 @@ def time_get_indexer_list(self, index):
277277
self.data.get_indexer(self.cat_list)
278278

279279

280-
class PanelIndexing(object):
281-
282-
def setup(self):
283-
with warnings.catch_warnings(record=True):
284-
self.p = Panel(np.random.randn(100, 100, 100))
285-
self.inds = range(0, 100, 10)
286-
287-
def time_subset(self):
288-
with warnings.catch_warnings(record=True):
289-
self.p.ix[(self.inds, self.inds, self.inds)]
290-
291-
292280
class MethodLookup(object):
293281

294282
def setup_cache(self):

asv_bench/benchmarks/io/stata.py

+13-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class Stata(BaseIO):
1212

1313
def setup(self, convert_dates):
1414
self.fname = '__test__.dta'
15-
N = 100000
16-
C = 5
15+
N = self.N = 100000
16+
C = self.C = 5
1717
self.df = DataFrame(np.random.randn(N, C),
1818
columns=['float{}'.format(i) for i in range(C)],
1919
index=date_range('20000101', periods=N, freq='H'))
20-
self.df['object'] = tm.makeStringIndex(N)
20+
self.df['object'] = tm.makeStringIndex(self.N)
2121
self.df['int8_'] = np.random.randint(np.iinfo(np.int8).min,
2222
np.iinfo(np.int8).max - 27, N)
2323
self.df['int16_'] = np.random.randint(np.iinfo(np.int16).min,
@@ -36,4 +36,14 @@ def time_write_stata(self, convert_dates):
3636
self.df.to_stata(self.fname, self.convert_dates)
3737

3838

39+
class StataMissing(Stata):
40+
def setup(self, convert_dates):
41+
super(StataMissing, self).setup(convert_dates)
42+
for i in range(10):
43+
missing_data = np.random.randn(self.N)
44+
missing_data[missing_data < 0] = np.nan
45+
self.df['missing_{0}'.format(i)] = missing_data
46+
self.df.to_stata(self.fname, self.convert_dates)
47+
48+
3949
from ..pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/join_merge.py

+1-27
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import warnings
21
import string
32

43
import numpy as np
54
import pandas.util.testing as tm
6-
from pandas import (DataFrame, Series, Panel, MultiIndex,
5+
from pandas import (DataFrame, Series, MultiIndex,
76
date_range, concat, merge, merge_asof)
87

98
try:
@@ -66,31 +65,6 @@ def time_concat_mixed_ndims(self, axis):
6665
concat(self.mixed_ndims, axis=axis)
6766

6867

69-
class ConcatPanels(object):
70-
71-
params = ([0, 1, 2], [True, False])
72-
param_names = ['axis', 'ignore_index']
73-
74-
def setup(self, axis, ignore_index):
75-
with warnings.catch_warnings(record=True):
76-
panel_c = Panel(np.zeros((10000, 200, 2),
77-
dtype=np.float32,
78-
order='C'))
79-
self.panels_c = [panel_c] * 20
80-
panel_f = Panel(np.zeros((10000, 200, 2),
81-
dtype=np.float32,
82-
order='F'))
83-
self.panels_f = [panel_f] * 20
84-
85-
def time_c_ordered(self, axis, ignore_index):
86-
with warnings.catch_warnings(record=True):
87-
concat(self.panels_c, axis=axis, ignore_index=ignore_index)
88-
89-
def time_f_ordered(self, axis, ignore_index):
90-
with warnings.catch_warnings(record=True):
91-
concat(self.panels_f, axis=axis, ignore_index=ignore_index)
92-
93-
9468
class ConcatDataFrames(object):
9569

9670
params = ([0, 1], [True, False])

asv_bench/benchmarks/panel_ctor.py

-55
This file was deleted.

asv_bench/benchmarks/panel_methods.py

-25
This file was deleted.

azure-pipelines.yml

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
name: Linux
1111
vmImage: ubuntu-16.04
1212

13-
# Windows Python 2.7 needs VC 9.0 installed, handled in the template
1413
- template: ci/azure/windows.yml
1514
parameters:
1615
name: Windows

ci/azure/posix.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ jobs:
99
strategy:
1010
matrix:
1111
${{ if eq(parameters.name, 'macOS') }}:
12-
py35_np_120:
12+
py35_macos:
1313
ENV_FILE: ci/deps/azure-macos-35.yaml
1414
CONDA_PY: "35"
1515
PATTERN: "not slow and not network"
1616

1717
${{ if eq(parameters.name, 'Linux') }}:
18-
py27_np_120:
19-
ENV_FILE: ci/deps/azure-27-compat.yaml
20-
CONDA_PY: "27"
21-
PATTERN: "not slow and not network"
22-
23-
py27_locale_slow_old_np:
24-
ENV_FILE: ci/deps/azure-27-locale.yaml
25-
CONDA_PY: "27"
26-
PATTERN: "slow"
27-
LOCALE_OVERRIDE: "zh_CN.UTF-8"
28-
EXTRA_APT: "language-pack-zh-hans"
29-
3018
py36_locale_slow:
3119
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
3220
CONDA_PY: "36"

ci/azure/windows.yml

-11
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,12 @@ jobs:
1212
ENV_FILE: ci/deps/azure-windows-36.yaml
1313
CONDA_PY: "36"
1414

15-
py27_np121:
16-
ENV_FILE: ci/deps/azure-windows-27.yaml
17-
CONDA_PY: "27"
18-
1915
steps:
2016
- task: CondaEnvironment@1
2117
inputs:
2218
updateConda: no
2319
packageSpecs: ''
2420

25-
- powershell: |
26-
$wc = New-Object net.webclient
27-
$wc.Downloadfile("https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi")
28-
Start-Process "VCForPython27.msi" /qn -Wait
29-
displayName: 'Install VC 9.0 only for Python 2.7'
30-
condition: eq(variables.CONDA_PY, '27')
31-
3221
- script: |
3322
ci\\incremental\\setup_conda_environment.cmd
3423
displayName: 'Before Install'

ci/deps/azure-27-compat.yaml

-28
This file was deleted.

ci/deps/azure-27-locale.yaml

-30
This file was deleted.

ci/deps/azure-windows-27.yaml

-33
This file was deleted.

ci/deps/azure-windows-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- pyarrow
1616
- pytables
1717
- python-dateutil
18-
- python=3.6.6
18+
- python=3.6.*
1919
- pytz
2020
- scipy
2121
- xlrd

0 commit comments

Comments
 (0)