Skip to content

Commit 961aed3

Browse files
committed
merge master (pandas-dev#25436)
2 parents 3994a65 + edf5ae8 commit 961aed3

File tree

849 files changed

+27715
-22633
lines changed

Some content is hidden

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

849 files changed

+27715
-22633
lines changed

.github/CONTRIBUTING.md

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

33
Whether you are a novice or experienced software developer, all contributions and suggestions are welcome!
44

5-
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst) or [on the website](https://pandas-docs.github.io/pandas-docs-travis/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
5+
Our main contributing guide can be found [in this repo](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst) or [on the website](https://pandas-docs.github.io/pandas-docs-travis/development/contributing.html). If you do not want to read it in its entirety, we will summarize the main ways in which you can contribute and point to relevant sections of that document for further information.
66

77
## Getting Started
88

@@ -18,6 +18,6 @@ If you notice a bug in the code or documentation, or have suggestions for how we
1818

1919
The code is hosted on [GitHub](https://www.github.com/pandas-dev/pandas), so you will need to use [Git](http://git-scm.com/) to clone the project and make changes to the codebase. Once you have obtained a copy of the code, you should create a development environment that is separate from your existing Python environment so that you can make and test changes without compromising your own work environment. For more information, please refer to the "[Working with the code](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#working-with-the-code)" section.
2020

21-
Before submitting your changes for review, make sure to check that your changes do not break any tests. You can find more information about our test suites in the "[Test-driven development/code writing](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#test-driven-development-code-writing)" section. We also have guidelines regarding coding style that will be enforced during testing, which can be found in the "[Code standards](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#code-standards)" section.
21+
Before submitting your changes for review, make sure to check that your changes do not break any tests. You can find more information about our test suites in the "[Test-driven development/code writing](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#test-driven-development-code-writing)" section. We also have guidelines regarding coding style that will be enforced during testing, which can be found in the "[Code standards](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#code-standards)" section.
2222

2323
Once your changes are ready to be submitted, make sure to push your changes to GitHub before creating a pull request. Details about how to do that can be found in the "[Contributing your changes to pandas](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#contributing-your-changes-to-pandas)" section. We will review your changes, and you will most likely be asked to make additional changes before it is finally ready to merge. However, once it's ready, we will merge it, and you will have successfully contributed to the codebase!

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://pandas.pydata.org/donate.html

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ dist
6161
.coverage
6262
coverage.xml
6363
coverage_html_report
64+
.mypy_cache
6465
*.pytest_cache
6566
# hypothesis test database
6667
.hypothesis/
68+
__pycache__
6769

6870
# OS generated files #
6971
######################

.pep8speaks.yml

-15
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,3 @@
22

33
scanner:
44
diff_only: True # If True, errors caused by only the patch are shown
5-
6-
# Opened issue in pep8speaks, so we can directly use the config in setup.cfg
7-
# (and avoid having to duplicate it here):
8-
# https://github.com/OrkoHunter/pep8speaks/issues/95
9-
10-
pycodestyle:
11-
max-line-length: 79
12-
ignore:
13-
- W503, # line break before binary operator
14-
- W504, # line break after binary operator
15-
- E402, # module level import not at top of file
16-
- E731, # do not assign a lambda expression, use a def
17-
- C406, # Unnecessary list literal - rewrite as a dict literal.
18-
- C408, # Unnecessary dict call - rewrite as a literal.
19-
- C409 # Unnecessary list passed to tuple() - rewrite as a tuple literal.

.travis.yml

+8-18
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,17 @@ matrix:
4141

4242
- dist: trusty
4343
env:
44-
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36.yaml" PATTERN="((not slow and not network) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
44+
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36-cov.yaml" PATTERN="((not slow and not network) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
4545

4646
# In allow_failures
4747
- dist: trusty
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"
@@ -82,28 +75,25 @@ before_install:
8275
install:
8376
- echo "install start"
8477
- ci/prep_cython_cache.sh
85-
- ci/install_travis.sh
78+
- ci/setup_env.sh
8679
- ci/submit_cython_cache.sh
8780
- echo "install done"
8881

8982
before_script:
90-
- ci/install_db_travis.sh
83+
# display server (for clipboard functionality) needs to be started here,
84+
# does not work if done in install:setup_env.sh (GH-26103)
9185
- export DISPLAY=":99.0"
92-
- ci/before_script_travis.sh
86+
- echo "sh -e /etc/init.d/xvfb start"
87+
- sh -e /etc/init.d/xvfb start
88+
- sleep 3
9389

9490
script:
9591
- echo "script start"
9692
- source activate pandas-dev
97-
- ci/build_docs.sh
9893
- ci/run_tests.sh
9994

10095
after_script:
10196
- echo "after_script start"
10297
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
103-
- if [ -e test-data-single.xml ]; then
104-
ci/print_skipped.py test-data-single.xml;
105-
fi
106-
- if [ -e test-data-multiple.xml ]; then
107-
ci/print_skipped.py test-data-multiple.xml;
108-
fi
98+
- ci/print_skipped.py
10999
- echo "after_script done"

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.

LICENSES/SIX

-21
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pip install pandas
164164
```
165165

166166
## Dependencies
167-
- [NumPy](https://www.numpy.org): 1.12.0 or higher
167+
- [NumPy](https://www.numpy.org): 1.13.3 or higher
168168
- [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher
169169
- [pytz](https://pythonhosted.org/pytz): 2015.4 or higher
170170

@@ -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/asv.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
// `asv` will cache wheels of the recent builds in each
108108
// environment, making them faster to install next time. This is
109109
// number of builds to keep, per environment.
110-
"wheel_cache_size": 8,
110+
"build_cache_size": 8,
111111

112112
// The commits after which the regression search in `asv publish`
113113
// should start looking for regressions. Dictionary whose keys are

asv_bench/benchmarks/algorithms.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
pass
1414

1515

16-
class Factorize(object):
16+
class Factorize:
1717

1818
params = [[True, False], ['int', 'uint', 'float', 'string']]
1919
param_names = ['sort', 'dtype']
@@ -30,7 +30,7 @@ def time_factorize(self, sort, dtype):
3030
self.idx.factorize(sort=sort)
3131

3232

33-
class FactorizeUnique(object):
33+
class FactorizeUnique:
3434

3535
params = [[True, False], ['int', 'uint', 'float', 'string']]
3636
param_names = ['sort', 'dtype']
@@ -48,7 +48,7 @@ def time_factorize(self, sort, dtype):
4848
self.idx.factorize(sort=sort)
4949

5050

51-
class Duplicated(object):
51+
class Duplicated:
5252

5353
params = [['first', 'last', False], ['int', 'uint', 'float', 'string']]
5454
param_names = ['keep', 'dtype']
@@ -67,7 +67,7 @@ def time_duplicated(self, keep, dtype):
6767
self.idx.duplicated(keep=keep)
6868

6969

70-
class DuplicatedUniqueIndex(object):
70+
class DuplicatedUniqueIndex:
7171

7272
params = ['int', 'uint', 'float', 'string']
7373
param_names = ['dtype']
@@ -86,7 +86,7 @@ def time_duplicated_unique(self, dtype):
8686
self.idx.duplicated()
8787

8888

89-
class Hashing(object):
89+
class Hashing:
9090

9191
def setup_cache(self):
9292
N = 10**5
@@ -124,7 +124,7 @@ def time_series_dates(self, df):
124124
hashing.hash_pandas_object(df['dates'])
125125

126126

127-
class Quantile(object):
127+
class Quantile:
128128
params = [[0, 0.5, 1],
129129
['linear', 'nearest', 'lower', 'higher', 'midpoint'],
130130
['float', 'int', 'uint']]

asv_bench/benchmarks/attrs_caching.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pandas.util.decorators import cache_readonly
77

88

9-
class DataFrameAttributes(object):
9+
class DataFrameAttributes:
1010

1111
def setup(self):
1212
self.df = DataFrame(np.random.randn(10, 6))
@@ -19,7 +19,7 @@ def time_set_index(self):
1919
self.df.index = self.cur_index
2020

2121

22-
class CacheReadonly(object):
22+
class CacheReadonly:
2323

2424
def setup(self):
2525

asv_bench/benchmarks/binary_ops.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pandas.computation.expressions as expr
88

99

10-
class Ops(object):
10+
class Ops:
1111

1212
params = [[True, False], ['default', 1]]
1313
param_names = ['use_numexpr', 'threads']
@@ -38,7 +38,7 @@ def teardown(self, use_numexpr, threads):
3838
expr.set_numexpr_threads()
3939

4040

41-
class Ops2(object):
41+
class Ops2:
4242

4343
def setup(self):
4444
N = 10**3
@@ -88,7 +88,7 @@ def time_frame_series_dot(self):
8888
self.df.dot(self.s)
8989

9090

91-
class Timeseries(object):
91+
class Timeseries:
9292

9393
params = [None, 'US/Eastern']
9494
param_names = ['tz']
@@ -114,7 +114,7 @@ def time_timestamp_ops_diff_with_shift(self, tz):
114114
self.s - self.s.shift()
115115

116116

117-
class AddOverflowScalar(object):
117+
class AddOverflowScalar:
118118

119119
params = [1, -1, 0]
120120
param_names = ['scalar']
@@ -127,7 +127,7 @@ def time_add_overflow_scalar(self, scalar):
127127
checked_add_with_arr(self.arr, scalar)
128128

129129

130-
class AddOverflowArray(object):
130+
class AddOverflowArray:
131131

132132
def setup(self):
133133
N = 10**6

0 commit comments

Comments
 (0)