Skip to content

Commit 114ff4d

Browse files
committed
Merge branch 'main' into do-not-error-on-other-dbapi2-connections
2 parents 89c4371 + c64fbce commit 114ff4d

File tree

165 files changed

+3320
-2914
lines changed

Some content is hidden

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

165 files changed

+3320
-2914
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- [ ] closes #xxxx
2-
- [ ] tests added / passed
3-
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
4-
- [ ] whatsnew entry
1+
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
2+
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
3+
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
4+
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

asv_bench/benchmarks/groupby.py

+9
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,12 @@ def setup(self):
741741
index=np.random.choice(range(10), n),
742742
)
743743

744+
n = 1_000_000
745+
self.df_tall = DataFrame(
746+
np.random.randn(n, 3),
747+
index=np.random.randint(0, 5, n),
748+
)
749+
744750
n = 20000
745751
self.df1 = DataFrame(
746752
np.random.randint(1, n, (n, 3)), columns=["jim", "joe", "jolie"]
@@ -760,6 +766,9 @@ def time_transform_lambda_max(self):
760766
def time_transform_ufunc_max(self):
761767
self.df.groupby(level="lev1").transform(np.max)
762768

769+
def time_transform_lambda_max_tall(self):
770+
self.df_tall.groupby(level=0).transform(lambda x: np.max(x, axis=0))
771+
763772
def time_transform_lambda_max_wide(self):
764773
self.df_wide.groupby(level=0).transform(lambda x: np.max(x, axis=0))
765774

ci/deps/actions-38-downstream_compat.yaml

+19-15
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,57 @@ channels:
44
- conda-forge
55
dependencies:
66
- python=3.8
7-
- pip
87

98
# test dependencies
10-
- cython>=0.29.24
9+
- cython=0.29.24
1110
- pytest>=6.0
11+
- pytest-cov
1212
- pytest-xdist>=1.31
1313
- hypothesis>=5.5.3
14-
- pytest-cov>=2.10.1 # this is only needed in the coverage build, ref: GH 35737
15-
- nomkl
14+
- psutil
1615

1716
# required dependencies
18-
- numpy
1917
- python-dateutil
18+
- numpy
2019
- pytz
2120

2221
# optional dependencies
2322
- beautifulsoup4
2423
- blosc
25-
- fastparquet>=0.4.0
26-
- fsspec>=0.7.4
27-
- gcsfs
24+
- bottleneck
25+
- fastparquet
26+
- fsspec
2827
- html5lib
28+
- gcsfs
2929
- jinja2
3030
- lxml
3131
- matplotlib
32+
- numba
3233
- numexpr
33-
- odfpy
3434
- openpyxl
35+
- odfpy
3536
- pandas-gbq
3637
- psycopg2
37-
- pyarrow>=1.0.1
3838
- pymysql
3939
- pytables
40+
- pyarrow
41+
- pyreadstat
4042
- pyxlsb
41-
- s3fs>=0.4.0
43+
- s3fs
4244
- scipy
4345
- sqlalchemy
46+
- tabulate
4447
- xarray
4548
- xlrd
4649
- xlsxwriter
4750
- xlwt
51+
- zstandard
4852

4953
# downstream packages
50-
- aiobotocore<2.0.0 # GH#44311 pinned to fix docbuild
54+
- aiobotocore
5155
- boto3
52-
- botocore>=1.11
56+
- botocore
57+
- cftime
5358
- dask
5459
- ipython
5560
- geopandas
@@ -62,5 +67,4 @@ dependencies:
6267
- pandas-datareader
6368
- pyyaml
6469
- py
65-
- pip:
66-
- torch
70+
- pytorch

ci/deps/actions-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
- psycopg2
3737
- pymysql
3838
- pytables
39-
- pyarrow=3
39+
- pyarrow
4040
- pyreadstat
4141
- pyxlsb
4242
- s3fs

ci/deps/actions-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
- psycopg2
3737
- pymysql
3838
- pytables
39-
- pyarrow=5
39+
- pyarrow
4040
- pyreadstat
4141
- pyxlsb
4242
- s3fs

doc/source/development/code_style.rst

-49
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,12 @@ pandas code style guide
99
.. contents:: Table of contents:
1010
:local:
1111

12-
pandas follows the `PEP8 <https://www.python.org/dev/peps/pep-0008/>`_
13-
standard and uses `Black <https://black.readthedocs.io/en/stable/>`_
14-
and `Flake8 <https://flake8.pycqa.org/en/latest/>`_ to ensure a
15-
consistent code format throughout the project. We encourage you to use
16-
:ref:`pre-commit <contributing.pre-commit>` to automatically run ``black``,
17-
``flake8``, ``isort``, and related code checks when you make a git commit.
18-
1912
Patterns
2013
========
2114

2215
We use a ``flake8`` plugin, `pandas-dev-flaker <https://github.com/pandas-dev/pandas-dev-flaker>`_, to
2316
check our codebase for unwanted patterns. See its ``README`` for the up-to-date list of rules we enforce.
2417

25-
Testing
26-
=======
27-
28-
Failing tests
29-
--------------
30-
31-
See https://docs.pytest.org/en/latest/how-to/skipping.html for background.
32-
33-
Do not use ``pytest.xfail``
34-
---------------------------
35-
36-
Do not use this method. It has the same behavior as ``pytest.skip``, namely
37-
it immediately stops the test and does not check if the test will fail. If
38-
this is the behavior you desire, use ``pytest.skip`` instead.
39-
40-
Using ``pytest.mark.xfail``
41-
---------------------------
42-
43-
Use this method if a test is known to fail but the manner in which it fails
44-
is not meant to be captured. It is common to use this method for a test that
45-
exhibits buggy behavior or a non-implemented feature. If
46-
the failing test has flaky behavior, use the argument ``strict=False``. This
47-
will make it so pytest does not fail if the test happens to pass.
48-
49-
Prefer the decorator ``@pytest.mark.xfail`` and the argument ``pytest.param``
50-
over usage within a test so that the test is appropriately marked during the
51-
collection phase of pytest. For xfailing a test that involves multiple
52-
parameters, a fixture, or a combination of these, it is only possible to
53-
xfail during the testing phase. To do so, use the ``request`` fixture:
54-
55-
.. code-block:: python
56-
57-
import pytest
58-
59-
def test_xfail(request):
60-
mark = pytest.mark.xfail(raises=TypeError, reason="Indicate why here")
61-
request.node.add_marker(mark)
62-
63-
xfail is not to be used for tests involving failure due to invalid user arguments.
64-
For these tests, we need to verify the correct exception type and error message
65-
is being raised, using ``pytest.raises`` instead.
66-
6718
Miscellaneous
6819
=============
6920

0 commit comments

Comments
 (0)