Skip to content

Commit 09adcb7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 26814-optional-fu
2 parents c9ba2d6 + baa77c3 commit 09adcb7

Some content is hidden

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

69 files changed

+663
-281
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-macos-35.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies:
2323
- xlsxwriter
2424
- xlwt
2525
- pip:
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

doc/source/getting_started/10min.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ See the :ref:`Plotting <visualization>` docs.
712712
plt.close('all')
713713
714714
.. ipython:: python
715+
:okwarning:
715716
716717
ts = pd.Series(np.random.randn(1000),
717718
index=pd.date_range('1/1/2000', periods=1000))

doc/source/index.rst.template

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ See the :ref:`overview` for more detail about what's in the library.
3838
:maxdepth: 3
3939
:hidden:
4040
{% endif %}
41-
42-
{% if not single_doc -%}
41+
{% if not single_doc %}
4342
What's New in 0.25.0 <whatsnew/v0.25.0>
4443
install
4544
getting_started/index
@@ -52,8 +51,7 @@ See the :ref:`overview` for more detail about what's in the library.
5251
{% if not single_doc -%}
5352
development/index
5453
whatsnew/index
55-
{% endif -%}
56-
54+
{% endif %}
5755

5856
* :doc:`whatsnew/v0.25.0`
5957
* :doc:`install`

0 commit comments

Comments
 (0)