Skip to content

Commit aa38137

Browse files
authored
Merge branch 'master' into nui-regression
2 parents 0958554 + a380726 commit aa38137

File tree

217 files changed

+5003
-8095
lines changed

Some content is hidden

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

217 files changed

+5003
-8095
lines changed

.github/workflows/database.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
run: ci/run_tests.sh
8787
if: always()
8888

89+
- name: Build Version
90+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
91+
8992
- name: Publish test results
9093
uses: actions/upload-artifact@master
9194
with:
@@ -169,6 +172,9 @@ jobs:
169172
run: ci/run_tests.sh
170173
if: always()
171174

175+
- name: Build Version
176+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
177+
172178
- name: Publish test results
173179
uses: actions/upload-artifact@master
174180
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ asv_bench/pandas/
110110
doc/source/generated
111111
doc/source/user_guide/styled.xlsx
112112
doc/source/reference/api
113-
doc/source/_static
113+
doc/source/_static/*.html
114114
doc/source/vbench
115115
doc/source/vbench.rst
116116
doc/source/index.rst

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
minimum_pre_commit_version: '2.9.2'
1+
minimum_pre_commit_version: 2.9.2
22
repos:
33
- repo: https://github.com/python/black
44
rev: 20.8b1
@@ -162,9 +162,15 @@ repos:
162162
hooks:
163163
- id: yesqa
164164
- repo: https://github.com/pre-commit/pre-commit-hooks
165-
rev: v3.3.0
165+
rev: v3.4.0
166166
hooks:
167167
- id: end-of-file-fixer
168168
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$
169169
- id: trailing-whitespace
170170
exclude: \.(html|svg)$
171+
- repo: https://github.com/codespell-project/codespell
172+
rev: v2.0.0
173+
hooks:
174+
- id: codespell
175+
types_or: [python, rst, markdown]
176+
files: ^pandas/core/

asv_bench/benchmarks/frame_methods.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,19 @@ def time_frame_quantile(self, axis):
597597
self.df.quantile([0.1, 0.5], axis=axis)
598598

599599

600+
class Rank:
601+
param_names = ["dtype"]
602+
params = [
603+
["int", "uint", "float", "object"],
604+
]
605+
606+
def setup(self, dtype):
607+
self.df = DataFrame(np.random.randn(10000, 10), columns=range(10), dtype=dtype)
608+
609+
def time_rank(self, dtype):
610+
self.df.rank()
611+
612+
600613
class GetDtypeCounts:
601614
# 2807
602615
def setup(self):

asv_bench/benchmarks/groupby.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"skew",
3030
"cumprod",
3131
"cummax",
32-
"rank",
3332
"pct_change",
3433
"min",
3534
"var",

asv_bench/benchmarks/series_methods.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,18 @@ def time_func(self, func, N, dtype):
349349
self.func()
350350

351351

352+
class Rank:
353+
354+
param_names = ["dtype"]
355+
params = [
356+
["int", "uint", "float", "object"],
357+
]
358+
359+
def setup(self, dtype):
360+
self.s = Series(np.random.randint(0, 1000, size=100000), dtype=dtype)
361+
362+
def time_rank(self, dtype):
363+
self.s.rank()
364+
365+
352366
from .pandas_vb_common import setup # noqa: F401 isort:skip

doc/source/_static/banklist.html

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

doc/source/_static/excel_pivot.png

156 KB
Loading

doc/source/_static/logo_excel.svg

Lines changed: 27 additions & 0 deletions
Loading

doc/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@
6868
"contributors", # custom pandas extension
6969
]
7070

71-
exclude_patterns = ["**.ipynb_checkpoints"]
71+
exclude_patterns = [
72+
"**.ipynb_checkpoints",
73+
# to ensure that include files (partial pages) aren't built, exclude them
74+
# https://github.com/sphinx-doc/sphinx/issues/1965#issuecomment-124732907
75+
"**/includes/**",
76+
]
7277
try:
7378
import nbconvert
7479
except ImportError:

doc/source/development/contributing.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,17 @@ request by pushing to the branch on GitHub::
16101610

16111611
git push origin shiny-new-feature
16121612

1613+
Autofixing formatting errors
1614+
----------------------------
1615+
1616+
We use several styling checks (e.g. ``black``, ``flake8``, ``isort``) which are run after
1617+
you make a pull request. If there is a scenario where any of these checks fail then you
1618+
can comment::
1619+
1620+
@github-actions pre-commit
1621+
1622+
on that pull request. This will trigger a workflow which will autofix formatting errors.
1623+
16131624
Delete your merged branch (optional)
16141625
------------------------------------
16151626

doc/source/development/maintaining.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ Here are some things to check when reviewing a pull request.
151151
for regression fixes and small bug fixes, the next minor milestone otherwise)
152152
* Changes should comply with our :ref:`policies.version`.
153153

154+
Backporting
155+
-----------
156+
157+
In the case you want to apply changes to a stable branch from a newer branch then you
158+
can comment::
159+
160+
@meeseeksdev backport version-branch
161+
162+
This will trigger a workflow which will backport a given change to a branch
163+
(e.g. @meeseeksdev backport 1.2.x)
164+
154165
Cleaning up old issues
155166
----------------------
156167

doc/source/development/test_writing.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,6 @@ be located.
149149
``frame_or_series`` fixture, by convention it goes in the
150150
``tests.frame`` file.
151151

152-
- tests.generic.methods.test_mymethod
153-
154-
.. note::
155-
156-
The generic/methods/ directory is only for methods with tests
157-
that are fully parametrized over Series/DataFrame
158-
159152
7. Is your test for an Index method, not depending on Series/DataFrame?
160153
This test likely belongs in one of:
161154

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
If you're new to pandas, you might want to first read through :ref:`10 Minutes to pandas<10min>`
2+
to familiarize yourself with the library.
3+
4+
As is customary, we import pandas and NumPy as follows:
5+
6+
.. ipython:: python
7+
8+
import pandas as pd
9+
import numpy as np

doc/source/getting_started/comparison/comparison_with_sas.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,7 @@ For potential users coming from `SAS <https://en.wikipedia.org/wiki/SAS_(softwar
88
this page is meant to demonstrate how different SAS operations would be
99
performed in pandas.
1010

11-
If you're new to pandas, you might want to first read through :ref:`10 Minutes to pandas<10min>`
12-
to familiarize yourself with the library.
13-
14-
As is customary, we import pandas and NumPy as follows:
15-
16-
.. ipython:: python
17-
18-
import pandas as pd
19-
import numpy as np
20-
11+
.. include:: comparison_boilerplate.rst
2112

2213
.. note::
2314

@@ -48,14 +39,17 @@ General terminology translation
4839
``NaN``, ``.``
4940

5041

51-
``DataFrame`` / ``Series``
52-
~~~~~~~~~~~~~~~~~~~~~~~~~~
42+
``DataFrame``
43+
~~~~~~~~~~~~~
5344

5445
A ``DataFrame`` in pandas is analogous to a SAS data set - a two-dimensional
5546
data source with labeled columns that can be of different types. As will be
5647
shown in this document, almost any operation that can be applied to a data set
5748
using SAS's ``DATA`` step, can also be accomplished in pandas.
5849

50+
``Series``
51+
~~~~~~~~~~
52+
5953
A ``Series`` is the data structure that represents one column of a
6054
``DataFrame``. SAS doesn't have a separate data structure for a single column,
6155
but in general, working with a ``Series`` is analogous to referencing a column

0 commit comments

Comments
 (0)