Skip to content

Commit 28f3e72

Browse files
committed
Merge remote-tracking branch 'upstream/master' into from_ordered_dict
2 parents 3929945 + 9aef32d commit 28f3e72

File tree

159 files changed

+2921
-872
lines changed

Some content is hidden

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

159 files changed

+2921
-872
lines changed

.travis.yml

-8
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,10 @@ matrix:
4848
env:
4949
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
5050

51-
# In allow_failures
52-
- dist: trusty
53-
env:
54-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
5551
allow_failures:
5652
- dist: trusty
5753
env:
5854
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
59-
- dist: trusty
60-
env:
61-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
6255

6356
before_install:
6457
- echo "before_install"
@@ -97,7 +90,6 @@ before_script:
9790
script:
9891
- echo "script start"
9992
- source activate pandas-dev
100-
- ci/build_docs.sh
10193
- ci/run_tests.sh
10294

10395
after_script:

LICENSES/HAVEN_LICENSE

+2
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

+32
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.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Most development discussion is taking place on github in this repo. Further, the
224224

225225
All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
226226

227-
A detailed overview on how to contribute can be found in the **[contributing guide](https://pandas-docs.github.io/pandas-docs-travis/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
227+
A detailed overview on how to contribute can be found in the **[contributing guide](https://dev.pandas.io/contributing.html)**. There is also an [overview](.github/CONTRIBUTING.md) on GitHub.
228228

229229
If you are simply looking to start working with the pandas codebase, navigate to the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) and start looking through interesting issues. There are a number of issues listed under [Docs](https://github.com/pandas-dev/pandas/issues?labels=Docs&sort=updated&state=open) and [good first issue](https://github.com/pandas-dev/pandas/issues?labels=good+first+issue&sort=updated&state=open) where you could start out.
230230

asv_bench/benchmarks/ctors.py

+7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,14 @@ class SeriesConstructors:
5555
[False, True],
5656
['float', 'int']]
5757

58+
# Generators get exhausted on use, so run setup before every call
59+
number = 1
60+
repeat = (3, 250, 10)
61+
5862
def setup(self, data_fmt, with_index, dtype):
63+
if data_fmt in (gen_of_str, gen_of_tuples) and with_index:
64+
raise NotImplementedError('Series constructors do not support '
65+
'using generators with indexes')
5966
N = 10**4
6067
if dtype == 'float':
6168
arr = np.random.randn(N)

asv_bench/benchmarks/frame_ctor.py

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ class FromRecords:
7272
params = [None, 1000]
7373
param_names = ['nrows']
7474

75+
# Generators get exhausted on use, so run setup before every call
76+
number = 1
77+
repeat = (3, 250, 10)
78+
7579
def setup(self, nrows):
7680
N = 100000
7781
self.gen = ((x, (x * 20), (x * 100)) for x in range(N))

asv_bench/benchmarks/sparse.py

+11-19
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

+7-3
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
@@ -122,7 +123,7 @@ jobs:
122123
timeoutInMinutes: 90
123124
steps:
124125
- script: |
125-
echo '##vso[task.setvariable variable=ENV_FILE]ci/deps/travis-36-doc.yaml'
126+
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
126127
displayName: 'Setting environment variables'
127128
128129
- script: |
@@ -134,14 +135,18 @@ 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: |
141145
cd doc/build/html
142146
git init
143147
touch .nojekyll
144148
echo "dev.pandas.io" > CNAME
149+
printf "User-agent: *\nDisallow: /" > robots.txt
145150
git add --all .
146151
git config user.email "[email protected]"
147152
git config user.name "pandas-docs-bot"
@@ -172,7 +177,6 @@ jobs:
172177
cd doc/build/html
173178
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
174179
git push -f origin master
175-
exit 0 # FIXME this will leave the build green even if the step fails. To be removed when we are confident with this.
176180
displayName: 'Publish docs to GitHub pages'
177181
condition : |
178182
and(not(eq(variables['Build.Reason'], 'PullRequest')),

ci/build_docs.sh

-56
This file was deleted.

ci/deps/azure-macos-35.yaml

+1
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

+1
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-36-doc.yaml

-46
This file was deleted.

ci/deps/travis-37.yaml

+1
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

+2-2
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
@@ -460,7 +460,7 @@ Building master branch documentation
460460

461461
When pull requests are merged into the *pandas* ``master`` branch, the main parts of
462462
the documentation are also built by Travis-CI. These docs are then hosted `here
463-
<http://pandas-docs.github.io/pandas-docs-travis>`__, see also
463+
<https://dev.pandas.io>`__, see also
464464
the :ref:`Continuous Integration <contributing.ci>` section.
465465

466466
.. _contributing.code:

doc/source/getting_started/10min.rst

+1
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

+2-4
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`

doc/source/install.rst

+2
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,8 @@ pandas-gbq 0.8.0 Google Big Query access
285285
psycopg2 PostgreSQL engine for sqlalchemy
286286
pyarrow 0.9.0 Parquet and feather reading / writing
287287
pymysql MySQL engine for sqlalchemy
288+
pyreadstat SPSS files (.sav) reading
289+
pytables 3.4.2 HDF5 reading / writing
288290
qtpy Clipboard I/O
289291
s3fs 0.0.8 Amazon S3 access
290292
xarray 0.8.2 pandas-like API for N-dimensional data

0 commit comments

Comments
 (0)