Skip to content

Commit 760a3a3

Browse files
authored
Merge branch 'master' into iss24919_df_iloc_support_zero_dim_np_array
2 parents b979434 + bb43726 commit 760a3a3

File tree

155 files changed

+5212
-2254
lines changed

Some content is hidden

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

155 files changed

+5212
-2254
lines changed

.github/CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ Our main contributing guide can be found [in this repo](https://github.com/panda
88

99
If you are looking to contribute to the *pandas* codebase, the best place to start is the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues). This is also a great place for filing bug reports and making suggestions for ways in which we can improve the code and documentation.
1010

11-
If you have additional questions, feel free to ask them on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas). Further information can also be found in the "[Where to start?](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#where-to-start)" section.
11+
If you have additional questions, feel free to ask them on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas). Further information can also be found in the "[Where to start?](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#where-to-start)" section.
1212

1313
## Filing Issues
1414

15-
If you notice a bug in the code or documentation, or have suggestions for how we can improve either, feel free to create an issue on the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) using [GitHub's "issue" form](https://github.com/pandas-dev/pandas/issues/new). The form contains some questions that will help us best address your issue. For more information regarding how to file issues against *pandas*, please refer to the "[Bug reports and enhancement requests](https://github.com/pandas-dev/pandas/blob/master/doc/source/contributing.rst#bug-reports-and-enhancement-requests)" section.
15+
If you notice a bug in the code or documentation, or have suggestions for how we can improve either, feel free to create an issue on the [GitHub "issues" tab](https://github.com/pandas-dev/pandas/issues) using [GitHub's "issue" form](https://github.com/pandas-dev/pandas/issues/new). The form contains some questions that will help us best address your issue. For more information regarding how to file issues against *pandas*, please refer to the "[Bug reports and enhancement requests](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#bug-reports-and-enhancement-requests)" section.
1616

1717
## Contributing to the Codebase
1818

19-
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/contributing.rst#working-with-the-code)" section.
19+
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/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/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

23-
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/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!
23+
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ asv_bench/pandas/
101101
# Documentation generated files #
102102
#################################
103103
doc/source/generated
104-
doc/source/api/generated
104+
doc/source/user_guide/styled.xlsx
105+
doc/source/reference/api
105106
doc/source/_static
106107
doc/source/vbench
107108
doc/source/vbench.rst
108109
doc/source/index.rst
109110
doc/build/html/index.html
110111
# Windows specific leftover:
111112
doc/tmp.sv
112-
doc/source/styled.xlsx
113113
env/
114114
doc/source/savefig/

asv_bench/benchmarks/algorithms.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pandas as pd
66
from pandas.util import testing as tm
77

8-
98
for imp in ['pandas.util', 'pandas.tools.hashing']:
109
try:
1110
hashing = import_module(imp)
@@ -142,4 +141,4 @@ def time_quantile(self, quantile, interpolation, dtype):
142141
self.idx.quantile(quantile, interpolation=interpolation)
143142

144143

145-
from .pandas_vb_common import setup # noqa: F401
144+
from .pandas_vb_common import setup # noqa: F401 isort:skip

asv_bench/benchmarks/categoricals.py

+13-6
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,19 @@ class CategoricalSlicing(object):
223223

224224
def setup(self, index):
225225
N = 10**6
226-
values = list('a' * N + 'b' * N + 'c' * N)
227-
indices = {
228-
'monotonic_incr': pd.Categorical(values),
229-
'monotonic_decr': pd.Categorical(reversed(values)),
230-
'non_monotonic': pd.Categorical(list('abc' * N))}
231-
self.data = indices[index]
226+
categories = ['a', 'b', 'c']
227+
values = [0] * N + [1] * N + [2] * N
228+
if index == 'monotonic_incr':
229+
self.data = pd.Categorical.from_codes(values,
230+
categories=categories)
231+
elif index == 'monotonic_decr':
232+
self.data = pd.Categorical.from_codes(list(reversed(values)),
233+
categories=categories)
234+
elif index == 'non_monotonic':
235+
self.data = pd.Categorical.from_codes([0, 1, 2] * N,
236+
categories=categories)
237+
else:
238+
raise ValueError('Invalid index param: {}'.format(index))
232239

233240
self.scalar = 10000
234241
self.list = list(range(10000))

asv_bench/benchmarks/strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ def setup(self, repeats):
102102
N = 10**5
103103
self.s = Series(tm.makeStringIndex(N))
104104
repeat = {'int': 1, 'array': np.random.randint(1, 3, N)}
105-
self.repeat = repeat[repeats]
105+
self.values = repeat[repeats]
106106

107107
def time_repeat(self, repeats):
108-
self.s.str.repeat(self.repeat)
108+
self.s.str.repeat(self.values)
109109

110110

111111
class Cat(object):

doc/make.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, num_jobs=0, include_api=True, single_doc=None,
5353
if single_doc and single_doc.endswith('.rst'):
5454
self.single_doc_html = os.path.splitext(single_doc)[0] + '.html'
5555
elif single_doc:
56-
self.single_doc_html = 'api/generated/pandas.{}.html'.format(
56+
self.single_doc_html = 'reference/api/pandas.{}.html'.format(
5757
single_doc)
5858

5959
def _process_single_doc(self, single_doc):
@@ -63,7 +63,7 @@ def _process_single_doc(self, single_doc):
6363
6464
For example, categorial.rst or pandas.DataFrame.head. For the latter,
6565
return the corresponding file path
66-
(e.g. generated/pandas.DataFrame.head.rst).
66+
(e.g. reference/api/pandas.DataFrame.head.rst).
6767
"""
6868
base_name, extension = os.path.splitext(single_doc)
6969
if extension in ('.rst', '.ipynb'):
@@ -258,7 +258,7 @@ def clean():
258258
Clean documentation generated files.
259259
"""
260260
shutil.rmtree(BUILD_PATH, ignore_errors=True)
261-
shutil.rmtree(os.path.join(SOURCE_PATH, 'api', 'generated'),
261+
shutil.rmtree(os.path.join(SOURCE_PATH, 'reference', 'api'),
262262
ignore_errors=True)
263263

264264
def zip_html(self):

0 commit comments

Comments
 (0)