Skip to content

Commit d22658a

Browse files
SaturnFromTitanrhshadrach
authored andcommitted
[BUG] fix .at for multiindexed series
Addresses: GH26989
1 parent 8f51c99 commit d22658a

File tree

237 files changed

+5985
-3756
lines changed

Some content is hidden

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

237 files changed

+5985
-3756
lines changed

.github/workflows/ci.yml

+17-53
Original file line numberDiff line numberDiff line change
@@ -125,68 +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
155148
if: github.event_name == 'push'
156149

157150
- name: Sync web with OVH
158-
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
159-
if: github.event_name == 'push'
160-
161-
- name: Create git repo to upload the built docs to GitHub pages
162-
run: |
163-
cd pandas_web
164-
git init
165-
touch .nojekyll
166-
echo "dev.pandas.io" > CNAME
167-
printf "User-agent: *\nDisallow: /" > robots.txt
168-
git add --all .
169-
git config user.email "[email protected]"
170-
git config user.name "pandas-bot"
171-
git commit -m "pandas web and documentation in master"
151+
run: rclone sync --exclude pandas-docs/** web/build ovh_host:prod
172152
if: github.event_name == 'push'
173153

174-
# For this task to work, next steps are required:
175-
# 1. Generate a pair of private/public keys (i.e. `ssh-keygen -t rsa -b 4096 -C "[email protected]"`)
176-
# 2. Go to https://github.com/pandas-dev/pandas/settings/secrets
177-
# 3. Click on "Add a new secret"
178-
# 4. Name: "github_pagas_ssh_key", Value: <Content of the private ssh key>
179-
# 5. The public key needs to be upladed to https://github.com/pandas-dev/pandas-dev.github.io/settings/keys
180-
- name: Install GitHub pages ssh deployment key
181-
uses: shimataro/ssh-key-action@v2
182-
with:
183-
key: ${{ secrets.github_pages_ssh_key }}
184-
known_hosts: 'github.com,192.30.252.128 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
185-
if: github.event_name == 'push'
186-
187-
- name: Publish web and docs to GitHub pages
188-
run: |
189-
cd pandas_web
190-
git remote add origin [email protected]:pandas-dev/pandas-dev.github.io.git
191-
git push -f origin master || true
154+
- name: Sync dev docs with OVH
155+
run: rclone sync doc/build/html ovh_host:prod/pandas-docs/dev
192156
if: github.event_name == 'push'

LICENSES/HAVEN_LICENSE

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

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

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

ci/azure/posix.yml

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

+15-5
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/redirects.csv

+22-4
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
Loading

doc/source/development/code_style.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Patterns
2121
foo.__class__
2222
-------------
2323

24-
*pandas* uses 'type(foo)' instead 'foo.__class__' as it makes the code more
25-
readable.
2624

25+
pandas uses 'type(foo)' instead 'foo.__class__' as it is making the code more
26+
readable.
2727
For example:
2828

2929
**Good:**
@@ -50,7 +50,7 @@ Concatenated strings
5050
f-strings
5151
~~~~~~~~~
5252

53-
*pandas* uses f-strings formatting instead of '%' and '.format()' string formatters.
53+
pandas uses f-strings formatting instead of '%' and '.format()' string formatters.
5454

5555
The convention of using f-strings on a string that is concatenated over several lines,
5656
is to prefix only the lines containing values which need to be interpreted.
@@ -114,7 +114,7 @@ For example:
114114
Representation function (aka 'repr()')
115115
--------------------------------------
116116

117-
*pandas* uses 'repr()' instead of '%r' and '!r'.
117+
pandas uses 'repr()' instead of '%r' and '!r'.
118118

119119
The use of 'repr()' will only happen when the value is not an obvious string.
120120

0 commit comments

Comments
 (0)