Skip to content

Commit 96043d3

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 26760-converter
2 parents 6f71319 + baa77c3 commit 96043d3

Some content is hidden

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

73 files changed

+712
-317
lines changed

LICENSES/HAVEN_LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2013-2016
2+
COPYRIGHT HOLDER: Hadley Wickham; RStudio; and Evan Miller

LICENSES/HAVEN_MIT

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Based on http://opensource.org/licenses/MIT
2+
3+
This is a template. Complete and ship as file LICENSE the following 2
4+
lines (only)
5+
6+
YEAR:
7+
COPYRIGHT HOLDER:
8+
9+
and specify as
10+
11+
License: MIT + file LICENSE
12+
13+
Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
14+
15+
Permission is hereby granted, free of charge, to any person obtaining
16+
a copy of this software and associated documentation files (the
17+
"Software"), to deal in the Software without restriction, including
18+
without limitation the rights to use, copy, modify, merge, publish,
19+
distribute, sublicense, and/or sell copies of the Software, and to
20+
permit persons to whom the Software is furnished to do so, subject to
21+
the following conditions:
22+
23+
The above copyright notice and this permission notice shall be
24+
included in all copies or substantial portions of the Software.
25+
26+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

asv_bench/benchmarks/sparse.py

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import itertools
2-
31
import numpy as np
42
import scipy.sparse
5-
from pandas import (SparseSeries, SparseDataFrame, SparseArray, Series,
6-
date_range, MultiIndex)
3+
4+
import pandas as pd
5+
from pandas import MultiIndex, Series, SparseArray, date_range
76

87

98
def make_array(size, dense_proportion, fill_value, dtype):
@@ -25,10 +24,10 @@ def setup(self):
2524
data = np.random.randn(N)[:-i]
2625
idx = rng[:-i]
2726
data[100:] = np.nan
28-
self.series[i] = SparseSeries(data, index=idx)
27+
self.series[i] = pd.Series(pd.SparseArray(data), index=idx)
2928

3029
def time_series_to_frame(self):
31-
SparseDataFrame(self.series)
30+
pd.DataFrame(self.series)
3231

3332

3433
class SparseArrayConstructor:
@@ -51,16 +50,9 @@ def setup(self):
5150
N = 1000
5251
self.arr = np.arange(N)
5352
self.sparse = scipy.sparse.rand(N, N, 0.005)
54-
self.dict = dict(zip(range(N), itertools.repeat([0])))
55-
56-
def time_constructor(self):
57-
SparseDataFrame(columns=self.arr, index=self.arr)
5853

5954
def time_from_scipy(self):
60-
SparseDataFrame(self.sparse)
61-
62-
def time_from_dict(self):
63-
SparseDataFrame(self.dict)
55+
pd.DataFrame.sparse.from_spmatrix(self.sparse)
6456

6557

6658
class FromCoo:
@@ -71,7 +63,7 @@ def setup(self):
7163
shape=(100, 100))
7264

7365
def time_sparse_series_from_coo(self):
74-
SparseSeries.from_coo(self.matrix)
66+
pd.Series.sparse.from_coo(self.matrix)
7567

7668

7769
class ToCoo:
@@ -82,12 +74,12 @@ def setup(self):
8274
s[100] = -1.0
8375
s[999] = 12.1
8476
s.index = MultiIndex.from_product([range(10)] * 4)
85-
self.ss = s.to_sparse()
77+
self.ss = s.astype("Sparse")
8678

8779
def time_sparse_series_to_coo(self):
88-
self.ss.to_coo(row_levels=[0, 1],
89-
column_levels=[2, 3],
90-
sort_labels=True)
80+
self.ss.sparse.to_coo(row_levels=[0, 1],
81+
column_levels=[2, 3],
82+
sort_labels=True)
9183

9284

9385
class Arithmetic:

azure-pipelines.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ jobs:
55
parameters:
66
name: macOS
77
vmImage: xcode9-macos10.13
8+
89
- template: ci/azure/posix.yml
910
parameters:
1011
name: Linux
@@ -134,7 +135,10 @@ jobs:
134135
- script: |
135136
export PATH=$HOME/miniconda3/bin:$PATH
136137
source activate pandas-dev
137-
doc/make.py
138+
# Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547)
139+
doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]}
140+
grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 ))
141+
exit $(( $SPHINX_RET + $IPY_RET ))
138142
displayName: 'Build documentation'
139143
140144
- script: |

ci/deps/azure-35-compat.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- beautifulsoup4=4.4.1
6+
- beautifulsoup4=4.6.0
77
- bottleneck=1.2.1
88
- jinja2=2.8
99
- numexpr=2.6.2
1010
- numpy=1.13.3
11-
- openpyxl=2.4.0
11+
- openpyxl=2.4.8
1212
- pytables=3.4.2
13-
- python-dateutil=2.5.0
13+
- python-dateutil=2.6.1
1414
- python=3.5.*
15-
- pytz=2015.4
15+
- pytz=2017.2
1616
- scipy=0.19.0
17-
- xlrd=1.0.0
18-
- xlsxwriter=0.7.7
19-
- xlwt=1.0.0
17+
- xlrd=1.1.0
18+
- xlsxwriter=0.9.8
19+
- xlwt=1.2.0
2020
# universal
2121
- cython=0.28.2
2222
- hypothesis>=3.58.0

ci/deps/azure-36-locale.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- beautifulsoup4==4.5.1
6+
- beautifulsoup4==4.6.0
77
- bottleneck=1.2.*
88
- cython=0.28.2
99
- lxml
1010
- matplotlib=2.2.2
1111
- numpy=1.14.*
12-
- openpyxl=2.4.0
12+
- openpyxl=2.4.8
1313
- python-dateutil
1414
- python-blosc
1515
- python=3.6.*
16-
- pytz=2016.10
16+
- pytz=2017.2
1717
- scipy
1818
- sqlalchemy=1.1.4
19-
- xlrd=1.0.0
20-
- xlsxwriter=0.9.4
19+
- xlrd=1.1.0
20+
- xlsxwriter=0.9.8
2121
- xlwt=1.2.0
2222
# universal
2323
- pytest>=4.0.2

ci/deps/azure-macos-35.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ dependencies:
1616
- pyarrow
1717
- pytables
1818
- python=3.5.*
19+
- python-dateutil==2.6.1
1920
- pytz
2021
- xarray
2122
- xlrd
2223
- xlsxwriter
2324
- xlwt
2425
- pip:
25-
- python-dateutil==2.5.3
26+
- pyreadstat
2627
# universal
2728
- pytest==4.5.0
2829
- pytest-xdist

ci/deps/azure-windows-37.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ dependencies:
3030
- pytest-mock
3131
- moto
3232
- hypothesis>=3.58.0
33+
- pyreadstat

ci/deps/travis-37.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ dependencies:
1919
- hypothesis>=3.58.0
2020
- s3fs
2121
- pip
22+
- pyreadstat
2223
- pip:
2324
- moto

doc/source/development/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ You'll need to have at least python3.5 installed on your system.
221221
# Use an ENV_DIR of your choice. We'll use ~/virtualenvs/pandas-dev
222222
# Any parent directories should already exist
223223
python3 -m venv ~/virtualenvs/pandas-dev
224-
# Activate the virtulaenv
224+
# Activate the virtualenv
225225
. ~/virtualenvs/pandas-dev/bin/activate
226226
227227
# Install the build dependencies

0 commit comments

Comments
 (0)