Skip to content

Commit 5e5d272

Browse files
authored
Merge branch 'master' into enh-column-wise-fillna
2 parents 621d2a7 + 19624de commit 5e5d272

File tree

335 files changed

+8790
-6262
lines changed

Some content is hidden

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

335 files changed

+8790
-6262
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -125,35 +125,32 @@ jobs:
125125
- name: Check ipython directive errors
126126
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
127127

128-
- name: Merge website and docs
129-
run: |
130-
mkdir -p pandas_web/docs
131-
cp -r web/build/* pandas_web/
132-
cp -r doc/build/html/* pandas_web/docs/
133-
if: github.event_name == 'push'
134-
135128
- name: Install Rclone
136129
run: sudo apt install rclone -y
137130
if: github.event_name == 'push'
138131

139132
- name: Set up Rclone
140133
run: |
141-
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
142-
mkdir -p `dirname $RCLONE_CONFIG_PATH`
143-
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
144-
echo "type = swift" >> $RCLONE_CONFIG_PATH
145-
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
146-
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
147-
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
148-
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
149-
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
150-
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
151-
echo "domain = default" >> $RCLONE_CONFIG_PATH
152-
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
153-
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
154-
echo "region = BHS" >> $RCLONE_CONFIG_PATH
134+
CONF=$HOME/.config/rclone/rclone.conf
135+
mkdir -p `dirname $CONF`
136+
echo "[ovh_host]" > $CONF
137+
echo "type = swift" >> $CONF
138+
echo "env_auth = false" >> $CONF
139+
echo "auth_version = 3" >> $CONF
140+
echo "auth = https://auth.cloud.ovh.net/v3/" >> $CONF
141+
echo "endpoint_type = public" >> $CONF
142+
echo "tenant_domain = default" >> $CONF
143+
echo "tenant = 2977553886518025" >> $CONF
144+
echo "domain = default" >> $CONF
145+
echo "user = w4KGs3pmDxpd" >> $CONF
146+
echo "key = ${{ secrets.ovh_object_store_key }}" >> $CONF
147+
echo "region = BHS" >> $CONF
148+
if: github.event_name == 'push'
149+
150+
- name: Sync web with OVH
151+
run: rclone sync --exclude pandas-docs/** web/build ovh_host:prod
155152
if: github.event_name == 'push'
156153

157-
- name: Sync web
158-
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
154+
- name: Sync dev docs with OVH
155+
run: rclone sync doc/build/html ovh_host:prod/pandas-docs/dev
159156
if: github.event_name == 'push'

LICENSES/HAVEN_LICENSE

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1-
YEAR: 2013-2016
2-
COPYRIGHT HOLDER: Hadley Wickham; RStudio; and Evan Miller
1+
# MIT License
2+
3+
Copyright (c) 2019 Hadley Wickham; RStudio; and Evan Miller
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

asv_bench/benchmarks/arithmetic.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,36 @@ def time_frame_op_with_scalar(self, dtype, scalar, op):
5050
op(self.df, scalar)
5151

5252

53+
class MixedFrameWithSeriesAxis0:
54+
params = [
55+
[
56+
"eq",
57+
"ne",
58+
"lt",
59+
"le",
60+
"ge",
61+
"gt",
62+
"add",
63+
"sub",
64+
"div",
65+
"floordiv",
66+
"mul",
67+
"pow",
68+
]
69+
]
70+
param_names = ["opname"]
71+
72+
def setup(self, opname):
73+
arr = np.arange(10 ** 6).reshape(100, -1)
74+
df = DataFrame(arr)
75+
df["C"] = 1.0
76+
self.df = df
77+
self.ser = df[0]
78+
79+
def time_frame_op_with_series_axis0(self, opname):
80+
getattr(self.df, opname)(self.ser, axis=0)
81+
82+
5383
class Ops:
5484

5585
params = [[True, False], ["default", 1]]

azure-pipelines.yml

Lines changed: 6 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
2+
trigger:
3+
- master
4+
5+
pr:
6+
- master
7+
28
jobs:
39
# Mac and Linux use the same template
410
- template: ci/azure/posix.yml
@@ -15,78 +21,3 @@ jobs:
1521
parameters:
1622
name: Windows
1723
vmImage: vs2017-win2016
18-
19-
- job: 'Web_and_Docs'
20-
pool:
21-
vmImage: ubuntu-16.04
22-
timeoutInMinutes: 90
23-
steps:
24-
- script: |
25-
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
26-
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
27-
displayName: 'Setting environment variables'
28-
29-
- script: |
30-
sudo apt-get install -y libc6-dev-i386
31-
ci/setup_env.sh
32-
displayName: 'Setup environment and build pandas'
33-
34-
- script: |
35-
source activate pandas-dev
36-
python web/pandas_web.py web/pandas --target-path=web/build
37-
displayName: 'Build website'
38-
39-
- script: |
40-
source activate pandas-dev
41-
# 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)
42-
doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]}
43-
grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 ))
44-
exit $(( $SPHINX_RET + $IPY_RET ))
45-
displayName: 'Build documentation'
46-
47-
- script: |
48-
mkdir -p to_deploy/docs
49-
cp -r web/build/* to_deploy/
50-
cp -r doc/build/html/* to_deploy/docs/
51-
displayName: 'Merge website and docs'
52-
53-
- script: |
54-
cd to_deploy
55-
git init
56-
touch .nojekyll
57-
echo "dev.pandas.io" > CNAME
58-
printf "User-agent: *\nDisallow: /" > robots.txt
59-
git add --all .
60-
git config user.email "[email protected]"
61-
git config user.name "pandas-bot"
62-
git commit -m "pandas web and documentation in master"
63-
displayName: 'Create git repo for docs build'
64-
condition : |
65-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
66-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
67-
68-
# For `InstallSSHKey@0` to work, next steps are required:
69-
# 1. Generate a pair of private/public keys (i.e. `ssh-keygen -t rsa -b 4096 -C "[email protected]"`)
70-
# 2. Go to "Library > Secure files" in the Azure Pipelines dashboard: https://dev.azure.com/pandas-dev/pandas/_library?itemType=SecureFiles
71-
# 3. Click on "+ Secure file"
72-
# 4. Upload the private key (the name of the file must match with the specified in "sshKeySecureFile" input below, "pandas_docs_key")
73-
# 5. Click on file name after it is created, tick the box "Authorize for use in all pipelines" and save
74-
# 6. The public key specified in "sshPublicKey" is the pair of the uploaded private key, and needs to be set as a deploy key of the repo where the docs will be pushed (with write access): https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
75-
- task: InstallSSHKey@0
76-
inputs:
77-
hostName: 'github.com,192.30.252.128 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
78-
sshPublicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHmz3l/EdqrgNxEUKkwDUuUcLv91unig03pYFGO/DMIgCmPdMG96zAgfnESd837Rm0wSSqylwSzkRJt5MV/TpFlcVifDLDQmUhqCeO8Z6dLl/oe35UKmyYICVwcvQTAaHNnYRpKC5IUlTh0JEtw9fGlnp1Ta7U1ENBLbKdpywczElhZu+hOQ892zqOj3CwA+U2329/d6cd7YnqIKoFN9DWT3kS5K6JE4IoBfQEVekIOs23bKjNLvPoOmi6CroAhu/K8j+NCWQjge5eJf2x/yTnIIP1PlEcXoHIr8io517posIx3TBup+CN8bNS1PpDW3jyD3ttl1uoBudjOQrobNnJeR6Rn67DRkG6IhSwr3BWj8alwUG5mTdZzwV5Pa9KZFdIiqX7NoDGg+itsR39QCn0thK8lGRNSR8KrWC1PSjecwelKBO7uQ7rnk/rkrZdBWR4oEA8YgNH8tirUw5WfOr5a0AIaJicKxGKNdMxZt+zmC+bS7F4YCOGIm9KHa43RrKhoGRhRf9fHHHKUPwFGqtWG4ykcUgoamDOURJyepesBAO3FiRE9rLU6ILbB3yEqqoekborHmAJD5vf7PWItW3Q/YQKuk3kkqRcKnexPyzyyq5lUgTi8CxxZdaASIOu294wjBhhdyHlXEkVTNJ9JKkj/obF+XiIIp0cBDsOXY9hDQ== [email protected]'
79-
sshKeySecureFile: 'pandas_docs_key'
80-
displayName: 'Install GitHub ssh deployment key'
81-
condition : |
82-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
83-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
84-
85-
- script: |
86-
cd to_deploy
87-
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
88-
git push -f origin master
89-
displayName: 'Publish web and docs to GitHub pages'
90-
condition : |
91-
and(not(eq(variables['Build.Reason'], 'PullRequest')),
92-
eq(variables['Build.SourceBranch'], 'refs/heads/master'))

ci/azure/posix.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
LC_ALL: "it_IT.utf8"
3939
EXTRA_APT: "language-pack-it xsel"
4040

41-
py36_32bit:
42-
ENV_FILE: ci/deps/azure-36-32bit.yaml
43-
CONDA_PY: "36"
44-
PATTERN: "not slow and not network and not clipboard"
45-
BITS32: "yes"
41+
#py36_32bit:
42+
# ENV_FILE: ci/deps/azure-36-32bit.yaml
43+
# CONDA_PY: "36"
44+
# PATTERN: "not slow and not network and not clipboard"
45+
# BITS32: "yes"
4646

4747
py37_locale:
4848
ENV_FILE: ci/deps/azure-37-locale.yaml

ci/code_checks.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
267267
-k"-nonzero -reindex -searchsorted -to_dict"
268268
RET=$(($RET + $?)) ; echo $MSG "DONE"
269269

270-
MSG='Doctests generic.py' ; echo $MSG
271-
pytest -q --doctest-modules pandas/core/generic.py \
272-
-k"-_set_axis_name -_xs -describe -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -to_json -transpose -values -xs -to_clipboard"
273-
RET=$(($RET + $?)) ; echo $MSG "DONE"
274-
275270
MSG='Doctests groupby.py' ; echo $MSG
276271
pytest -q --doctest-modules pandas/core/groupby/groupby.py -k"-cumcount -describe -pipe"
277272
RET=$(($RET + $?)) ; echo $MSG "DONE"
@@ -311,6 +306,17 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
311306
pytest -q --doctest-modules pandas/core/arrays/boolean.py
312307
RET=$(($RET + $?)) ; echo $MSG "DONE"
313308

309+
MSG='Doctests base.py' ; echo $MSG
310+
pytest -q --doctest-modules pandas/core/base.py
311+
RET=$(($RET + $?)) ; echo $MSG "DONE"
312+
313+
MSG='Doctests construction.py' ; echo $MSG
314+
pytest -q --doctest-modules pandas/core/construction.py
315+
RET=$(($RET + $?)) ; echo $MSG "DONE"
316+
317+
MSG='Doctests generic.py' ; echo $MSG
318+
pytest -q --doctest-modules pandas/core/generic.py
319+
RET=$(($RET + $?)) ; echo $MSG "DONE"
314320
fi
315321

316322
### DOCSTRINGS ###
@@ -320,6 +326,10 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
320326
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA02,SA03,SA05
321327
RET=$(($RET + $?)) ; echo $MSG "DONE"
322328

329+
MSG='Validate correct capitalization among titles in documentation' ; echo $MSG
330+
$BASE_DIR/scripts/validate_rst_title_capitalization.py $BASE_DIR/doc/source/development/contributing.rst
331+
RET=$(($RET + $?)) ; echo $MSG "DONE"
332+
323333
fi
324334

325335
### DEPENDENCIES ###

doc/make.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def _process_single_doc(self, single_doc):
8383
obj = pandas # noqa: F821
8484
for name in single_doc.split("."):
8585
obj = getattr(obj, name)
86-
except AttributeError:
87-
raise ImportError(f"Could not import {single_doc}")
86+
except AttributeError as err:
87+
raise ImportError(f"Could not import {single_doc}") from err
8888
else:
8989
return single_doc[len("pandas.") :]
9090
else:

doc/redirects.csv

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ release,whatsnew/index
77

88
# getting started
99
install,getting_started/install
10-
10min,getting_started/10min
11-
basics,getting_started/basics
1210
comparison_with_r,getting_started/comparison/comparison_with_r
1311
comparison_with_sql,getting_started/comparison/comparison_with_sql
1412
comparison_with_sas,getting_started/comparison/comparison_with_sas
1513
comparison_with_stata,getting_started/comparison/comparison_with_stata
16-
dsintro,getting_started/dsintro
1714
overview,getting_started/overview
1815
tutorials,getting_started/tutorials
1916

@@ -38,6 +35,9 @@ text,user_guide/text
3835
timedeltas,user_guide/timedeltas
3936
timeseries,user_guide/timeseries
4037
visualization,user_guide/visualization
38+
10min,user_guide/10min
39+
basics,user_guide/basics
40+
dsintro,user_guide/dsintro
4141

4242
# development
4343
contributing,development/contributing
@@ -49,7 +49,25 @@ internals,development/internals
4949
# api moved function
5050
reference/api/pandas.io.json.json_normalize,pandas.json_normalize
5151

52-
# api rename
52+
# rename due to refactors
53+
reference/api/pandas.core.window.Rolling,pandas.core.window.rolling.Rolling
54+
reference/api/pandas.core.window.Rolling.aggregate,pandas.core.window.rolling.Rolling.aggregate
55+
reference/api/pandas.core.window.Rolling.apply,pandas.core.window.rolling.Rolling.apply
56+
reference/api/pandas.core.window.Rolling.corr,pandas.core.window.rolling.Rolling.corr
57+
reference/api/pandas.core.window.Rolling.count,pandas.core.window.rolling.Rolling.count
58+
reference/api/pandas.core.window.Rolling.cov,pandas.core.window.rolling.Rolling.cov
59+
reference/api/pandas.core.window.Rolling.kurt,pandas.core.window.rolling.Rolling.kurt
60+
reference/api/pandas.core.window.Rolling.max,pandas.core.window.rolling.Rolling.max
61+
reference/api/pandas.core.window.Rolling.mean,pandas.core.window.rolling.Rolling.mean
62+
reference/api/pandas.core.window.Rolling.median,pandas.core.window.rolling.Rolling.median
63+
reference/api/pandas.core.window.Rolling.min,pandas.core.window.rolling.Rolling.min
64+
reference/api/pandas.core.window.Rolling.quantile,pandas.core.window.rolling.Rolling.quantile
65+
reference/api/pandas.core.window.Rolling.skew,pandas.core.window.rolling.Rolling.skew
66+
reference/api/pandas.core.window.Rolling.std,pandas.core.window.rolling.Rolling.std
67+
reference/api/pandas.core.window.Rolling.sum,pandas.core.window.rolling.Rolling.sum
68+
reference/api/pandas.core.window.Rolling.var,pandas.core.window.rolling.Rolling.var
69+
70+
# api url change (generated -> reference/api rename)
5371
api,reference/index
5472
generated/pandas.api.extensions.ExtensionArray.argsort,../reference/api/pandas.api.extensions.ExtensionArray.argsort
5573
generated/pandas.api.extensions.ExtensionArray.astype,../reference/api/pandas.api.extensions.ExtensionArray.astype
Lines changed: 72 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)