Skip to content

Commit 37562c0

Browse files
Oleksii PolovyiOleksii Polovyi
Oleksii Polovyi
authored and
Oleksii Polovyi
committed
Merge branch 'master' into issue-9606
2 parents 3372278 + 437efa6 commit 37562c0

File tree

816 files changed

+20161
-18500
lines changed

Some content is hidden

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

816 files changed

+20161
-18500
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
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!

.gitignore

Lines changed: 2 additions & 0 deletions
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

Lines changed: 0 additions & 15 deletions
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

Lines changed: 9 additions & 15 deletions
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,21 +35,13 @@ 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"
5041

5142
- dist: trusty
5243
env:
53-
- 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
5445

5546
# In allow_failures
5647
- dist: trusty
@@ -60,14 +51,14 @@ matrix:
6051
# In allow_failures
6152
- dist: trusty
6253
env:
63-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
54+
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
6455
allow_failures:
6556
- dist: trusty
6657
env:
6758
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
6859
- dist: trusty
6960
env:
70-
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
61+
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
7162

7263
before_install:
7364
- echo "before_install"
@@ -91,14 +82,17 @@ before_install:
9182
install:
9283
- echo "install start"
9384
- ci/prep_cython_cache.sh
94-
- ci/install_travis.sh
85+
- ci/setup_env.sh
9586
- ci/submit_cython_cache.sh
9687
- echo "install done"
9788

9889
before_script:
99-
- ci/install_db_travis.sh
90+
# display server (for clipboard functionality) needs to be started here,
91+
# does not work if done in install:setup_env.sh (GH-26103)
10092
- export DISPLAY=":99.0"
101-
- ci/before_script_travis.sh
93+
- echo "sh -e /etc/init.d/xvfb start"
94+
- sh -e /etc/init.d/xvfb start
95+
- sleep 3
10296

10397
script:
10498
- echo "script start"

LICENSES/SIX

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
<td>Package Status</td>
2727
<td>
2828
<a href="https://pypi.org/project/pandas/">
29-
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" /></td>
29+
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" />
3030
</a>
31+
</td>
3132
</tr>
3233
<tr>
3334
<td>License</td>
@@ -73,8 +74,8 @@
7374
<td>Gitter</td>
7475
<td>
7576
<a href="https://gitter.im/pydata/pandas">
76-
<img src="https://badges.gitter.im/Join%20Chat.svg"
77-
</a>
77+
<img src="https://badges.gitter.im/Join%20Chat.svg" />
78+
</a>
7879
</td>
7980
</tr>
8081
</table>
@@ -163,9 +164,9 @@ pip install pandas
163164
```
164165

165166
## Dependencies
166-
- [NumPy](https://www.numpy.org): 1.12.0 or higher
167+
- [NumPy](https://www.numpy.org): 1.13.3 or higher
167168
- [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher
168-
- [pytz](https://pythonhosted.org/pytz): 2011k or higher
169+
- [pytz](https://pythonhosted.org/pytz): 2015.4 or higher
169170

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

asv_bench/benchmarks/algorithms.py

Lines changed: 6 additions & 6 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 5 additions & 5 deletions
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

asv_bench/benchmarks/categoricals.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
pass
1313

1414

15-
class Concat(object):
15+
class Concat:
1616

1717
def setup(self):
1818
N = 10**5
@@ -28,7 +28,7 @@ def time_union(self):
2828
union_categoricals([self.a, self.b])
2929

3030

31-
class Constructor(object):
31+
class Constructor:
3232

3333
def setup(self):
3434
N = 10**5
@@ -77,7 +77,7 @@ def time_existing_series(self):
7777
pd.Categorical(self.series)
7878

7979

80-
class ValueCounts(object):
80+
class ValueCounts:
8181

8282
params = [True, False]
8383
param_names = ['dropna']
@@ -92,7 +92,7 @@ def time_value_counts(self, dropna):
9292
self.ts.value_counts(dropna=dropna)
9393

9494

95-
class Repr(object):
95+
class Repr:
9696

9797
def setup(self):
9898
self.sel = pd.Series(['s1234']).astype('category')
@@ -101,7 +101,7 @@ def time_rendering(self):
101101
str(self.sel)
102102

103103

104-
class SetCategories(object):
104+
class SetCategories:
105105

106106
def setup(self):
107107
n = 5 * 10**5
@@ -113,7 +113,7 @@ def time_set_categories(self):
113113
self.ts.cat.set_categories(self.ts.cat.categories[::2])
114114

115115

116-
class RemoveCategories(object):
116+
class RemoveCategories:
117117

118118
def setup(self):
119119
n = 5 * 10**5
@@ -125,7 +125,7 @@ def time_remove_categories(self):
125125
self.ts.cat.remove_categories(self.ts.cat.categories[::2])
126126

127127

128-
class Rank(object):
128+
class Rank:
129129

130130
def setup(self):
131131
N = 10**5
@@ -162,7 +162,7 @@ def time_rank_int_cat_ordered(self):
162162
self.s_int_cat_ordered.rank()
163163

164164

165-
class Isin(object):
165+
class Isin:
166166

167167
params = ['object', 'int64']
168168
param_names = ['dtype']
@@ -181,7 +181,7 @@ def time_isin_categorical(self, dtype):
181181
self.series.isin(self.sample)
182182

183183

184-
class IsMonotonic(object):
184+
class IsMonotonic:
185185

186186
def setup(self):
187187
N = 1000
@@ -201,7 +201,7 @@ def time_categorical_series_is_monotonic_decreasing(self):
201201
self.s.is_monotonic_decreasing
202202

203203

204-
class Contains(object):
204+
class Contains:
205205

206206
def setup(self):
207207
N = 10**5
@@ -216,7 +216,7 @@ def time_categorical_contains(self):
216216
self.key in self.c
217217

218218

219-
class CategoricalSlicing(object):
219+
class CategoricalSlicing:
220220

221221
params = ['monotonic_incr', 'monotonic_decr', 'non_monotonic']
222222
param_names = ['index']
@@ -257,7 +257,7 @@ def time_getitem_bool_array(self, index):
257257
self.data[self.data == self.cat_scalar]
258258

259259

260-
class Indexing(object):
260+
class Indexing:
261261

262262
def setup(self):
263263
N = 10**5

0 commit comments

Comments
 (0)