title stringlengths 1 185 | diff stringlengths 0 32.2M | body stringlengths 0 123k ⌀ | url stringlengths 57 58 | created_at stringlengths 20 20 | closed_at stringlengths 20 20 | merged_at stringlengths 20 20 ⌀ | updated_at stringlengths 20 20 |
|---|---|---|---|---|---|---|---|
ENH: IO support for R data files with `pandas.read_rdata` and `DataFrame.to_rdata` | diff --git a/ci/deps/actions-37.yaml b/ci/deps/actions-37.yaml
index 61f431256dd4a..9292e2aa7db39 100644
--- a/ci/deps/actions-37.yaml
+++ b/ci/deps/actions-37.yaml
@@ -25,4 +25,5 @@ dependencies:
- flask
- tabulate
- pyreadstat
+ - pyreadr
- pip
diff --git a/ci/deps/azure-macos-37.yaml b/ci/deps/azure-mac... | - [X] closes #40287
- [X] tests added / passed
- [X] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [X] whatsnew entry
- [X] install.rst entry
- [X] io.rst entry
---
Note: This PR relies on a new dependen... | https://api.github.com/repos/pandas-dev/pandas/pulls/40884 | 2021-04-11T19:42:33Z | 2021-04-22T22:35:21Z | null | 2023-05-11T01:20:58Z |
Backport PR #40877 on branch 1.2.x (Skipt failing tests for numpy dev) | diff --git a/pandas/tests/arrays/boolean/test_arithmetic.py b/pandas/tests/arrays/boolean/test_arithmetic.py
index 01de64568a011..9b854a81f2def 100644
--- a/pandas/tests/arrays/boolean/test_arithmetic.py
+++ b/pandas/tests/arrays/boolean/test_arithmetic.py
@@ -66,7 +66,10 @@ def test_div(left_array, right_array):
@pyt... | Backport PR #40877: Skipt failing tests for numpy dev | https://api.github.com/repos/pandas-dev/pandas/pulls/40883 | 2021-04-11T18:33:45Z | 2021-04-11T18:38:05Z | null | 2021-04-11T18:38:05Z |
Backport PR #40877 on branch 1.2.x (Skipt failing tests for numpy dev) | diff --git a/pandas/tests/arrays/boolean/test_arithmetic.py b/pandas/tests/arrays/boolean/test_arithmetic.py
index 01de64568a011..9b854a81f2def 100644
--- a/pandas/tests/arrays/boolean/test_arithmetic.py
+++ b/pandas/tests/arrays/boolean/test_arithmetic.py
@@ -66,7 +66,10 @@ def test_div(left_array, right_array):
@pyt... | Backport PR #40877
Had to add the is_numpy_dev import, we could otherwise import from other directory if this would be preferrable | https://api.github.com/repos/pandas-dev/pandas/pulls/40882 | 2021-04-11T16:43:29Z | 2021-04-12T07:57:16Z | 2021-04-12T07:57:16Z | 2021-04-18T16:00:29Z |
Backport PR #40877 on branch 1.2.x (Skipt failing tests for numpy dev) | diff --git a/pandas/tests/arrays/boolean/test_arithmetic.py b/pandas/tests/arrays/boolean/test_arithmetic.py
index 01de64568a011..9b854a81f2def 100644
--- a/pandas/tests/arrays/boolean/test_arithmetic.py
+++ b/pandas/tests/arrays/boolean/test_arithmetic.py
@@ -66,7 +66,10 @@ def test_div(left_array, right_array):
@pyt... | Backport PR #40877: Skipt failing tests for numpy dev | https://api.github.com/repos/pandas-dev/pandas/pulls/40881 | 2021-04-11T16:32:24Z | 2021-04-11T16:39:09Z | null | 2021-04-11T16:39:09Z |
DOC: 1.2.4 release date | diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst
index fffdf333178fc..54652ecc4dceb 100644
--- a/doc/source/whatsnew/v1.2.4.rst
+++ b/doc/source/whatsnew/v1.2.4.rst
@@ -1,7 +1,7 @@
.. _whatsnew_124:
-What's new in 1.2.4 (April ??, 2021)
----------------------------------------
+What's new... | draft till #40878 is merged as may cause conflicts. | https://api.github.com/repos/pandas-dev/pandas/pulls/40880 | 2021-04-11T14:12:34Z | 2021-04-12T12:17:07Z | 2021-04-12T12:17:07Z | 2021-04-12T12:18:08Z |
DOC: Updates Index.reindex docstrings (#40328) | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index 8fb88e625d948..ba80ad50f478c 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -1,10 +1,11 @@
from __future__ import annotations
+import functools
+import operator
+import warnings
from copy import copy as copy_... | - [x] closes #40328: explains function parameters and gives basic example
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see here for how to run them
- [ ] whatsnew entry | https://api.github.com/repos/pandas-dev/pandas/pulls/40879 | 2021-04-11T13:37:50Z | 2021-09-01T00:09:04Z | null | 2021-09-01T00:09:04Z |
REGR: ufunc with DataFrame input not passing all kwargs | diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst
index fffdf333178fc..f9d62ba9bd61c 100644
--- a/doc/source/whatsnew/v1.2.4.rst
+++ b/doc/source/whatsnew/v1.2.4.rst
@@ -21,6 +21,7 @@ Fixed regressions
- Fixed regression in :meth:`DataFrame.where` not returning a copy in the case of an all T... | - [x] closes #40662
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Credit to @attack68 for the fix, just figured we should try to get this is in for 1.2.4 if... | https://api.github.com/repos/pandas-dev/pandas/pulls/40878 | 2021-04-11T13:36:47Z | 2021-04-12T14:27:29Z | 2021-04-12T14:27:29Z | 2021-04-12T15:07:58Z |
Skipt failing tests for numpy dev | diff --git a/pandas/tests/arrays/boolean/test_arithmetic.py b/pandas/tests/arrays/boolean/test_arithmetic.py
index f8f1af4c3da51..8e879372cba31 100644
--- a/pandas/tests/arrays/boolean/test_arithmetic.py
+++ b/pandas/tests/arrays/boolean/test_arithmetic.py
@@ -69,7 +69,10 @@ def test_div(left_array, right_array):
@pyt... | - [x] xref #40874
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Skipping for now.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40877 | 2021-04-11T12:57:21Z | 2021-04-11T16:32:10Z | 2021-04-11T16:32:10Z | 2021-04-11T18:34:13Z |
Backport PR #40850 on branch 1.2.x (REGR: object column repr not respecting float format) | diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst
index 9cef1307278e8..fffdf333178fc 100644
--- a/doc/source/whatsnew/v1.2.4.rst
+++ b/doc/source/whatsnew/v1.2.4.rst
@@ -20,7 +20,7 @@ Fixed regressions
- Fixed regression in (in)equality comparison of ``pd.NaT`` with a non-datetimelike numpy ... | Backport PR #40850: REGR: object column repr not respecting float format | https://api.github.com/repos/pandas-dev/pandas/pulls/40875 | 2021-04-11T12:41:00Z | 2021-04-11T14:05:59Z | 2021-04-11T14:05:59Z | 2021-04-11T14:05:59Z |
Add test to check check_like with different indexes | diff --git a/pandas/tests/util/test_assert_frame_equal.py b/pandas/tests/util/test_assert_frame_equal.py
index bf1311460a5f5..24ee6afb7c254 100644
--- a/pandas/tests/util/test_assert_frame_equal.py
+++ b/pandas/tests/util/test_assert_frame_equal.py
@@ -321,3 +321,11 @@ def test_frame_equal_mixed_dtypes(frame_or_series,... | - [x] closes #39739
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| https://api.github.com/repos/pandas-dev/pandas/pulls/40872 | 2021-04-11T11:54:11Z | 2021-04-11T13:01:50Z | 2021-04-11T13:01:50Z | 2021-04-11T13:01:55Z |
Two missing spaces in argmax, argmin docs | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 4e7c311f39cdb..65adc258a9b69 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -10843,7 +10843,7 @@ def median(
@doc(
_num_doc,
desc="Return the maximum of the values over the requested axis.\n\n"
- ... | I fixed the missing space that made the documentation render "isthe" instead of "is the".
Before the change:
- This **isthe** equivalent of the numpy.ndarray method argmax.
- This **isthe** equivalent of the numpy.ndarray method argmin.
After the change:
- This **is the** equivalent of the numpy.ndarray method... | https://api.github.com/repos/pandas-dev/pandas/pulls/40871 | 2021-04-11T00:30:41Z | 2021-04-11T06:02:43Z | 2021-04-11T06:02:43Z | 2021-04-11T06:02:44Z |
BUG: DataFrame.from_records doesn't raise proper error message when Series passed | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 64ec0801b5d8a..73e5d18217091 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -1970,6 +1970,15 @@ def from_records(
2 1 c
3 0 d
"""
+ if not (
+ (isinstance(data, np.ndarray) and ... | - [x] closes #40429
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40870 | 2021-04-10T21:54:20Z | 2021-08-17T00:33:33Z | null | 2021-08-17T00:33:34Z |
Deprecate level keyword for dataframe and series aggregations | diff --git a/doc/source/user_guide/advanced.rst b/doc/source/user_guide/advanced.rst
index 6377aeb0e7c74..bd9463c50ab1f 100644
--- a/doc/source/user_guide/advanced.rst
+++ b/doc/source/user_guide/advanced.rst
@@ -498,7 +498,7 @@ values across a level. For instance:
)
df = pd.DataFrame(np.random.randn(4, 2), ind... | - [x] closes #39983
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
This would deprecate the level keyword if we want to move forward with this | https://api.github.com/repos/pandas-dev/pandas/pulls/40869 | 2021-04-10T21:16:50Z | 2021-04-13T11:53:28Z | 2021-04-13T11:53:28Z | 2021-04-13T11:59:08Z |
ARM64 parallel builds | diff --git a/.travis.yml b/.travis.yml
index 8ede978074a9c..0098e3872bec7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,16 +35,9 @@ matrix:
fast_finish: true
include:
- - arch: arm64
+ - arch: arm64-graviton2
env:
- - JOB="3.7, arm64" PYTEST_WORKERS=1 ENV_FILE="ci/deps/travis-37-arm64.ya... | - [x] closes #36719
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Seems to have gotten build from > 1 hr to ~ 38 min. | https://api.github.com/repos/pandas-dev/pandas/pulls/40868 | 2021-04-10T20:16:59Z | 2021-04-13T15:55:37Z | 2021-04-13T15:55:36Z | 2021-04-15T07:33:45Z |
TYP: Overload series/drop_dupicates | diff --git a/pandas/core/series.py b/pandas/core/series.py
index 968ab27d6d58c..5ba68aaa5c16d 100644
--- a/pandas/core/series.py
+++ b/pandas/core/series.py
@@ -2003,6 +2003,22 @@ def unique(self) -> ArrayLike:
"""
return super().unique()
+ @overload
+ def drop_duplicates(self, keep=..., inpla... | - [ ] closes part of https://github.com/MarcoGorelli/pyladies-sprint-April-2021/issues/29
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40867 | 2021-04-10T19:15:52Z | 2021-04-12T08:11:23Z | 2021-04-12T08:11:23Z | 2021-05-11T08:27:12Z |
TST Add test for iloc on interval index | diff --git a/pandas/tests/indexing/test_iloc.py b/pandas/tests/indexing/test_iloc.py
index e2a063a7697d9..853c7079a3c1b 100644
--- a/pandas/tests/indexing/test_iloc.py
+++ b/pandas/tests/indexing/test_iloc.py
@@ -17,6 +17,7 @@
CategoricalDtype,
DataFrame,
Index,
+ Interval,
NaT,
Series,
... | - [ ] closes #17130
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
Adds tests for using iloc on an interval as index.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40866 | 2021-04-10T15:11:13Z | 2021-04-12T13:31:43Z | 2021-04-12T13:31:43Z | 2021-04-12T13:35:28Z |
BUG: Fix dtypes change using replace with nullable dtypes (#40732) | diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index 603cc6a6ff1f2..b71599e7ed46b 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -870,7 +870,13 @@ def _replace_coerce(
"""
if mask.any():
if not regex:
- ... | - [x] closes #40732
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40864 | 2021-04-10T12:26:50Z | 2021-06-08T18:19:50Z | null | 2021-06-08T18:19:50Z |
REF: separate 2D only methods from ArrayManager | diff --git a/pandas/_typing.py b/pandas/_typing.py
index c8df3ea0d7f76..9f23fcc56597f 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -185,11 +185,11 @@
]
# internals
-Manager = Union["ArrayManager", "BlockManager", "SingleBlockManager"]
+Manager = Union[
+ "ArrayManager", "SingleArrayManager", "BlockM... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
ArrayManager analogue to #40843, discussed briefly in #40853 | https://api.github.com/repos/pandas-dev/pandas/pulls/40863 | 2021-04-09T23:18:32Z | 2021-04-14T13:05:49Z | 2021-04-14T13:05:49Z | 2021-04-14T14:06:40Z |
Fix bug in index.union with duplicates and not a subset of each other | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 17cb0a7836fbe..f15c9ae4f7715 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -678,7 +678,7 @@ Interval
Indexing
^^^^^^^^
-- Bug in :meth:`Index.union` dropping duplicate ``Index`` values when ``Ind... | - [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
The previous fix missed one case where other has dups which are unique in self
| https://api.github.com/repos/pandas-dev/pandas/pulls/40862 | 2021-04-09T22:57:33Z | 2021-04-14T14:12:43Z | 2021-04-14T14:12:43Z | 2021-04-14T20:14:45Z |
Fix fillna accepting downcast as dict | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 21e6f0ea57451..8b0fec2f2c6f9 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -682,7 +682,7 @@ Missing
- Bug in :class:`Grouper` now correctly propagates ``dropna`` argument and :meth:`DataFrameGroup... | - [x] closes #40809
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
This fix makes sense in this case I think, but this does not fix the case for non-list lik... | https://api.github.com/repos/pandas-dev/pandas/pulls/40861 | 2021-04-09T22:15:49Z | 2021-04-13T23:22:59Z | 2021-04-13T23:22:59Z | 2021-04-16T20:37:01Z |
TYP: Improve clip() return and argument typing. | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 62ef9c91770b6..6b59841c909d6 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -7367,16 +7367,124 @@ def _clip_with_one_bound(self, threshold, method, axis, inplace):
threshold = align_method_FRAME(self, threshold, axi... | - [x] closes #40829
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| https://api.github.com/repos/pandas-dev/pandas/pulls/40860 | 2021-04-09T20:16:04Z | 2021-04-11T11:13:41Z | 2021-04-11T11:13:40Z | 2021-04-14T14:56:45Z |
REF: NDFrame dont mixin SelectionMixin | diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py
index e3a643a38e24c..a603222094bdb 100644
--- a/pandas/_testing/__init__.py
+++ b/pandas/_testing/__init__.py
@@ -918,12 +918,12 @@ def external_error_raised(expected_exception: type[Exception]) -> ContextManager
return pytest.raises(expected_e... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40857 | 2021-04-09T19:29:24Z | 2021-04-10T01:25:32Z | 2021-04-10T01:25:32Z | 2021-04-10T01:31:24Z |
CI: doc failure | diff --git a/doc/source/user_guide/window.rst b/doc/source/user_guide/window.rst
index 5efb3f40f5018..b692685b90234 100644
--- a/doc/source/user_guide/window.rst
+++ b/doc/source/user_guide/window.rst
@@ -158,7 +158,9 @@ By default the labels are set to the right edge of the window, but a
This can also be applied ... | Attempt to fix doc failure | https://api.github.com/repos/pandas-dev/pandas/pulls/40856 | 2021-04-09T19:03:33Z | 2021-04-09T21:20:00Z | 2021-04-09T21:20:00Z | 2021-04-09T21:55:25Z |
TYP: implement typing.Manager2D | diff --git a/pandas/_typing.py b/pandas/_typing.py
index 36441e620286d..c8df3ea0d7f76 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -187,6 +187,9 @@
# internals
Manager = Union["ArrayManager", "BlockManager", "SingleBlockManager"]
SingleManager = Union["SingleArrayManager", "SingleBlockManager"]
+Manager... | Makes it feasible to annotate a Manager as specifically-2D, which I find makes it easier to reason about some of the groupby code.
@jorisvandenbossche any objection to a refactor of ArrayManager to make SingleArrayManager share a parent class with ArrayManager, but not subclass it? See https://github.com/pandas-dev... | https://api.github.com/repos/pandas-dev/pandas/pulls/40853 | 2021-04-09T16:41:52Z | 2021-04-13T13:21:10Z | 2021-04-13T13:21:10Z | 2021-04-13T14:17:08Z |
PERF: use ndarray.take instead of algos.take | diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py
index 5bf9f81e3073d..6de9898a6dec0 100644
--- a/pandas/core/groupby/ops.py
+++ b/pandas/core/groupby/ops.py
@@ -67,7 +67,6 @@
maybe_fill,
)
-from pandas.core import algorithms
from pandas.core.arrays import ExtensionArray
from pandas.core.ba... | Un-revert part of #40510 in the hopes of tracking down where the perf impact was. | https://api.github.com/repos/pandas-dev/pandas/pulls/40852 | 2021-04-09T16:13:45Z | 2021-04-13T15:24:37Z | 2021-04-13T15:24:37Z | 2021-04-17T10:17:04Z |
DEPS: drop numpy 1.16 #40814 | diff --git a/ci/azure/windows.yml b/ci/azure/windows.yml
index e510f4115b25f..5644ad46714d5 100644
--- a/ci/azure/windows.yml
+++ b/ci/azure/windows.yml
@@ -8,7 +8,7 @@ jobs:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
- py37_np16:
+ py37_np17:
ENV_FILE: ci/deps/azure-windows-37... | - [x] closes #40814
| https://api.github.com/repos/pandas-dev/pandas/pulls/40851 | 2021-04-09T16:09:49Z | 2021-04-13T23:09:02Z | 2021-04-13T23:09:01Z | 2022-11-18T02:21:49Z |
REGR: object column repr not respecting float format | diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst
index 9cef1307278e8..fffdf333178fc 100644
--- a/doc/source/whatsnew/v1.2.4.rst
+++ b/doc/source/whatsnew/v1.2.4.rst
@@ -20,7 +20,7 @@ Fixed regressions
- Fixed regression in (in)equality comparison of ``pd.NaT`` with a non-datetimelike numpy ... | - [x] closes #40024
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
This is a regression caused by #38759 | https://api.github.com/repos/pandas-dev/pandas/pulls/40850 | 2021-04-09T15:29:39Z | 2021-04-11T12:39:10Z | 2021-04-11T12:39:10Z | 2021-04-11T12:49:42Z |
BUG: fix kwargs in `Styler.where` | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 3a0e1b7568c91..a9ad369ed7b3a 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -814,6 +814,7 @@ Other
- Bug in :meth:`Styler.background_gradient` where text-color was not determined correctly (:issue:`3... | Simple bug fix. `kwargs` not passed in correct place.
partially closes #40124 | https://api.github.com/repos/pandas-dev/pandas/pulls/40845 | 2021-04-09T07:31:48Z | 2021-04-09T16:29:18Z | 2021-04-09T16:29:18Z | 2021-04-12T18:45:03Z |
REF: share ArrayManager/BlockManager methods | diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py
index aedb9488b7454..fee1fadf8d6af 100644
--- a/pandas/core/internals/array_manager.py
+++ b/pandas/core/internals/array_manager.py
@@ -5,7 +5,6 @@
from typing import (
TYPE_CHECKING,
- Any,
Callable,
TypeV... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40844 | 2021-04-09T04:18:33Z | 2021-04-13T21:24:07Z | null | 2021-04-13T21:24:10Z |
REF: move 2D-only methods to BlockManager | diff --git a/pandas/core/internals/managers.py b/pandas/core/internals/managers.py
index b93f09c7df806..07ee23cec6648 100644
--- a/pandas/core/internals/managers.py
+++ b/pandas/core/internals/managers.py
@@ -339,58 +339,6 @@ def __repr__(self) -> str:
output += f"\n{block}"
return output
- d... | https://api.github.com/repos/pandas-dev/pandas/pulls/40843 | 2021-04-09T04:06:34Z | 2021-04-14T12:58:59Z | 2021-04-14T12:58:59Z | 2021-04-14T14:05:09Z | |
PERF: put BlockManager constructor in cython | diff --git a/pandas/_libs/internals.pyi b/pandas/_libs/internals.pyi
index d35d414aaa012..a46a1747d1d8d 100644
--- a/pandas/_libs/internals.pyi
+++ b/pandas/_libs/internals.pyi
@@ -11,6 +11,9 @@ from pandas._typing import (
T,
)
+from pandas import Index
+from pandas.core.internals.blocks import Block as B
+
d... | No idea why mypy started complaining about the io.parsers stuff | https://api.github.com/repos/pandas-dev/pandas/pulls/40842 | 2021-04-09T01:08:38Z | 2021-04-19T16:23:24Z | 2021-04-19T16:23:24Z | 2021-04-20T08:57:48Z |
PERF: NDArrayBackedExtensionArray in cython | diff --git a/pandas/_libs/arrays.pyx b/pandas/_libs/arrays.pyx
new file mode 100644
index 0000000000000..1f4a47c4e252a
--- /dev/null
+++ b/pandas/_libs/arrays.pyx
@@ -0,0 +1,167 @@
+"""
+Cython implementations for internal ExtensionArrays.
+"""
+cimport cython
+
+import numpy as np
+
+cimport numpy as cnp
+from numpy c... | This is a reboot of #40054, implements NDArrayBacked in a new arrays.pyx rather than in lib.pyx. The perf benefits have improved since #40054, as there is now the prospect of implementing a NDArrayBackedExtensionBlock in cython which will appreciably improve constructor and slicing performance. | https://api.github.com/repos/pandas-dev/pandas/pulls/40840 | 2021-04-08T22:27:24Z | 2021-04-14T13:04:21Z | 2021-04-14T13:04:21Z | 2021-04-14T14:10:05Z |
DOC: Fix wrong URL in web/README.md | diff --git a/web/README.md b/web/README.md
index 7396fbd0833a1..2e0fa6c8885a4 100644
--- a/web/README.md
+++ b/web/README.md
@@ -1,4 +1,4 @@
-Directory containing the pandas website (hosted at https://pandas.io).
+Directory containing the pandas website (hosted at https://pandas.pydata.org).
The website sources are ... |
- [x] closes #40828
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40838 | 2021-04-08T21:44:57Z | 2021-04-09T01:40:51Z | 2021-04-09T01:40:51Z | 2021-04-09T07:28:42Z |
TST: make flaky zip check less strict | diff --git a/pandas/tests/io/test_gcs.py b/pandas/tests/io/test_gcs.py
index 356c82293359a..2ba4fbe71e244 100644
--- a/pandas/tests/io/test_gcs.py
+++ b/pandas/tests/io/test_gcs.py
@@ -99,12 +99,13 @@ def test_to_read_gcs(gcs_buffer, format):
def assert_equal_zip_safe(result: bytes, expected: bytes):
"""
- W... | Saw this failure the other day:
```
pandas/tests/io/test_gcs.py:137:
71
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
72
73
result = b'PK\x03\x04\x14\x00\x00\x00\x08\x00\xe0\xa1\x87R3ET~\x18\x06\x00\x00\x8c\n\x00\x00\x03\x00\x00\x00zip-\x96]WT;\x0c\x8...x00\x00\x00\x00\x80\x... | https://api.github.com/repos/pandas-dev/pandas/pulls/40837 | 2021-04-08T18:08:44Z | 2021-04-13T15:50:21Z | 2021-04-13T15:50:21Z | 2021-04-13T16:53:51Z |
Dark background | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d6744f578560c..ca0c75f9de94f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -65,7 +65,7 @@ jobs:
if: always()
- name: Testing docstring validation script
- run: pytest --capture=no --strict-markers scripts... |
- [*] tests added / passed
- [*] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [*] Color in boxplot.py should be a hex value. Letter based color will be at matplotlib level. Using same color as that of boxes fo... | https://api.github.com/repos/pandas-dev/pandas/pulls/40836 | 2021-04-08T15:31:29Z | 2021-05-06T10:45:02Z | null | 2021-05-06T10:45:02Z |
BUG: Incorrect index shape when using a user-defined function for aggregating a grouped series with object-typed index. | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index ea7e0f88ff81e..e379f3126fa77 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -789,6 +789,7 @@ Groupby/resample/rolling
- :class:`core.window.ewm.ExponentialMovingWindow` now raises a ``NotImplementedE... | - [x] closes #40014
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40835 | 2021-04-08T14:02:33Z | 2021-04-15T04:16:50Z | 2021-04-15T04:16:49Z | 2021-04-15T04:17:10Z |
CLN: tighten cython declarations | diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx
index f1f56c6c0c855..f7cec262ca302 100644
--- a/pandas/_libs/index.pyx
+++ b/pandas/_libs/index.pyx
@@ -74,6 +74,7 @@ cdef class IndexEngine:
return val in self.mapping
cpdef get_loc(self, object val):
+ # -> Py_ssize_t | slice | ndarra... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40834 | 2021-04-08T03:52:11Z | 2021-04-13T11:36:23Z | 2021-04-13T11:36:23Z | 2021-04-13T14:22:55Z |
TYP: writers.pyi | diff --git a/pandas/_libs/writers.pyi b/pandas/_libs/writers.pyi
new file mode 100644
index 0000000000000..67f6059c2a825
--- /dev/null
+++ b/pandas/_libs/writers.pyi
@@ -0,0 +1,24 @@
+import numpy as np
+
+# TODO: can make this more specific
+def write_csv_rows(
+ data: list,
+ data_index: np.ndarray,
+ nlevel... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40832 | 2021-04-07T23:03:01Z | 2021-04-08T12:26:06Z | 2021-04-08T12:26:06Z | 2021-04-08T14:30:49Z |
TYP: join.pyi | diff --git a/pandas/_libs/join.pyi b/pandas/_libs/join.pyi
new file mode 100644
index 0000000000000..4ae3ef0781dde
--- /dev/null
+++ b/pandas/_libs/join.pyi
@@ -0,0 +1,144 @@
+import numpy as np
+
+def inner_join(
+ left: np.ndarray, # const intp_t[:]
+ right: np.ndarray, # const intp_t[:]
+ max_groups: int... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40831 | 2021-04-07T23:02:05Z | 2021-04-08T12:26:46Z | 2021-04-08T12:26:46Z | 2021-04-08T14:29:09Z |
TST: add test on checking objects to concatenate | diff --git a/pandas/tests/reshape/concat/test_concat.py b/pandas/tests/reshape/concat/test_concat.py
index 7b520171379c3..55ae754761a07 100644
--- a/pandas/tests/reshape/concat/test_concat.py
+++ b/pandas/tests/reshape/concat/test_concat.py
@@ -344,6 +344,10 @@ def test_concat_single_with_key(self):
expected =... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
When looking through the enhancement xref #40820,
I noticed that there was no test checkin... | https://api.github.com/repos/pandas-dev/pandas/pulls/40822 | 2021-04-07T08:22:34Z | 2021-04-08T14:36:30Z | 2021-04-08T14:36:30Z | 2021-04-08T14:36:35Z |
DEPR: `Styler.where` possible deprecation | diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py
index ff25bb1411189..4394c2023ceb9 100644
--- a/pandas/io/formats/style.py
+++ b/pandas/io/formats/style.py
@@ -572,7 +572,6 @@ def apply(
See Also
--------
- Styler.where: Apply CSS-styles based on a conditional function el... | closes #40124
Proposal to deprecate the method: `Styler.where`, since `Styler.applymap` and `Styler.where` are so similar in function, and return signatures, that it is almost confusing to have 2 methods for the same thing.
Note that `Styler.where` offers no advantage over `applymap` since internally it just res... | https://api.github.com/repos/pandas-dev/pandas/pulls/40821 | 2021-04-07T06:08:20Z | 2021-04-26T12:16:07Z | 2021-04-26T12:16:07Z | 2021-04-26T12:34:15Z |
ENH/BUG: Use Kleene logic for groupby any/all | diff --git a/asv_bench/benchmarks/groupby.py b/asv_bench/benchmarks/groupby.py
index 9930c61e34b15..b4b20553ec460 100644
--- a/asv_bench/benchmarks/groupby.py
+++ b/asv_bench/benchmarks/groupby.py
@@ -480,7 +480,19 @@ class GroupByCythonAgg:
param_names = ["dtype", "method"]
params = [
["float64"],
-... | - [x] closes #37506
- [x] closes #40585
- [x] closes #33449
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Built on #40811
ASV's don't look affected:
... | https://api.github.com/repos/pandas-dev/pandas/pulls/40819 | 2021-04-06T23:34:18Z | 2021-04-13T17:12:17Z | 2021-04-13T17:12:16Z | 2021-04-15T07:21:18Z |
REV: Revert #40510 | diff --git a/pandas/core/array_algos/take.py b/pandas/core/array_algos/take.py
index d062b39725867..b97a777400134 100644
--- a/pandas/core/array_algos/take.py
+++ b/pandas/core/array_algos/take.py
@@ -100,13 +100,14 @@ def take_nd(
return arr.take(indexer, fill_value=fill_value, allow_fill=allow_fill)
a... | @jorisvandenbossche reports that #40510 was performance-hurting, so this rolls it back until we can sort out why that is. | https://api.github.com/repos/pandas-dev/pandas/pulls/40818 | 2021-04-06T22:41:56Z | 2021-04-07T19:44:38Z | 2021-04-07T19:44:38Z | 2021-04-09T07:06:27Z |
BUG-7023 allow error bars to use style | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 21e6f0ea57451..d021b32b99590 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -728,7 +728,7 @@ Plotting
- Bug in :func:`scatter_matrix` raising when 2d ``ax`` argument passed (:issue:`16253`)
- Prev... | - [x] closes #7023
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40816 | 2021-04-06T22:11:30Z | 2021-05-11T19:57:29Z | null | 2021-05-11T19:57:29Z |
Fix line_terminator escaping in python doc | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 4ef5aa1109074..b3262c61a0597 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -3426,7 +3426,7 @@ def to_csv(
line_terminator : str, optional
The newline character or character sequence to use in the output
... | The line terminators are not escaped so we don't see the backslash here:

Source : https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html | https://api.github.com/repos/pandas-dev/pandas/pulls/40815 | 2021-04-06T22:10:58Z | 2021-04-07T13:44:54Z | 2021-04-07T13:44:54Z | 2021-04-07T13:44:58Z |
BUG: Support numpy.random.Generator as random_state input | diff --git a/pandas/core/common.py b/pandas/core/common.py
index 98606f5d3d240..a77dab1719a21 100644
--- a/pandas/core/common.py
+++ b/pandas/core/common.py
@@ -425,6 +425,8 @@ def random_state(state=None):
or (not np_version_under1p18 and isinstance(state, np.random.BitGenerator))
):
return np.r... | - [x] workaround for #38100
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40813 | 2021-04-06T20:15:10Z | 2021-04-07T10:04:45Z | null | 2021-04-07T10:05:02Z |
Subprocess to validate flake8 | diff --git a/scripts/validate_docstrings.py b/scripts/validate_docstrings.py
index 98de5b2b1eb84..d0f32bb554cf9 100755
--- a/scripts/validate_docstrings.py
+++ b/scripts/validate_docstrings.py
@@ -19,6 +19,7 @@
import importlib
import json
import os
+import subprocess
import sys
import tempfile
from typing import... | - [x] closes #40784
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry | https://api.github.com/repos/pandas-dev/pandas/pulls/40812 | 2021-04-06T19:33:40Z | 2021-04-09T01:40:08Z | 2021-04-09T01:40:08Z | 2021-04-09T07:29:04Z |
TST: Consolidate groupby any, all tests | diff --git a/pandas/tests/groupby/test_any_all.py b/pandas/tests/groupby/test_any_all.py
new file mode 100644
index 0000000000000..4123fb95002dd
--- /dev/null
+++ b/pandas/tests/groupby/test_any_all.py
@@ -0,0 +1,70 @@
+import builtins
+
+import numpy as np
+import pytest
+
+from pandas import (
+ DataFrame,
+ In... | Just a move, no change except defining `df` in `test_any` since fixture not in scope.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40811 | 2021-04-06T19:22:25Z | 2021-04-07T19:45:26Z | 2021-04-07T19:45:26Z | 2021-04-07T19:51:36Z |
Backport PR #40407 on branch 1.2.x (DOC: remove pin for pydata-sphinx-theme + update for latest release) | diff --git a/doc/source/_static/css/pandas.css b/doc/source/_static/css/pandas.css
index 403d182e3d3e5..87357fd8ae716 100644
--- a/doc/source/_static/css/pandas.css
+++ b/doc/source/_static/css/pandas.css
@@ -2,7 +2,7 @@
:root {
/* Use softer blue from bootstrap's default info color */
- --color-info: 23, 162, 1... | Backport PR #40407: DOC: remove pin for pydata-sphinx-theme + update for latest release | https://api.github.com/repos/pandas-dev/pandas/pulls/40807 | 2021-04-06T16:35:56Z | 2021-04-06T18:54:24Z | 2021-04-06T18:54:24Z | 2021-04-06T18:54:24Z |
Backport PR #40768 on branch 1.2.x (DOC/CI: temp pin of decorator (IPython dependency)) | diff --git a/environment.yml b/environment.yml
index bc5bfcd162500..b56e5c1e25d01 100644
--- a/environment.yml
+++ b/environment.yml
@@ -77,6 +77,7 @@ dependencies:
- bottleneck>=1.2.1
- ipykernel
- ipython>=7.11.1
+ - decorator=4 # temporary pin (dependency of IPython), see GH-40768
- jinja2 # pandas.St... | Backport PR #40768: DOC/CI: temp pin of decorator (IPython dependency) | https://api.github.com/repos/pandas-dev/pandas/pulls/40806 | 2021-04-06T15:44:18Z | 2021-04-06T16:36:58Z | null | 2021-04-06T16:36:58Z |
STY: remove --keep-runtime-typing from pyupgrade Final_Part-5 | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 057457e6d183e..d927be76843e1 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -54,7 +54,7 @@ repos:
rev: v2.11.0
hooks:
- id: pyupgrade
- args: [--py37-plus, --keep-runtime-typing]
+ args: [--py37-pl... | To fix issue #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) t... | https://api.github.com/repos/pandas-dev/pandas/pulls/40805 | 2021-04-06T14:16:50Z | 2021-04-06T18:08:31Z | 2021-04-06T18:08:30Z | 2021-04-06T18:21:11Z |
STY: remove --keep-runtime-typing from pyupgrade Part-4 | diff --git a/pandas/_typing.py b/pandas/_typing.py
index f90ef33434773..7c74fc54b8d67 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -25,7 +25,7 @@
Optional,
Sequence,
Tuple,
- Type,
+ Type as type_t,
TypeVar,
Union,
)
@@ -119,7 +119,7 @@
# dtypes
NpDtype = Union[str, np.dty... | xref #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) this has ... | https://api.github.com/repos/pandas-dev/pandas/pulls/40804 | 2021-04-06T14:16:05Z | 2021-04-06T15:33:32Z | 2021-04-06T15:33:32Z | 2021-04-06T15:33:32Z |
STY: remove --keep-runtime-typing from pyupgrade Part-3 | diff --git a/pandas/_typing.py b/pandas/_typing.py
index f90ef33434773..7c74fc54b8d67 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -25,7 +25,7 @@
Optional,
Sequence,
Tuple,
- Type,
+ Type as type_t,
TypeVar,
Union,
)
@@ -119,7 +119,7 @@
# dtypes
NpDtype = Union[str, np.dty... | xref #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from future import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (97) this has ... | https://api.github.com/repos/pandas-dev/pandas/pulls/40803 | 2021-04-06T14:14:52Z | 2021-04-06T15:34:05Z | 2021-04-06T15:34:05Z | 2021-04-06T16:18:44Z |
STY: remove --keep-runtime-typing from pyupgrade Part-2 | diff --git a/pandas/_typing.py b/pandas/_typing.py
index f90ef33434773..7c74fc54b8d67 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -25,7 +25,7 @@
Optional,
Sequence,
Tuple,
- Type,
+ Type as type_t,
TypeVar,
Union,
)
@@ -119,7 +119,7 @@
# dtypes
NpDtype = Union[str, np.dty... | To fix issue #40759 :
Changes here are from PEP585 (e.g. List[str] -> list[str]) and from PEP604 (Optional[str] -> str | None), both of which are only applied in the presence of from __future__ import annotations. Some imports became unused after this so those have been removed.
As there were changes in many files (9... | https://api.github.com/repos/pandas-dev/pandas/pulls/40802 | 2021-04-06T14:11:13Z | 2021-04-06T15:25:32Z | 2021-04-06T15:25:31Z | 2021-04-06T15:25:32Z |
Backport PR #38574 on branch 1.2.x (TST: fix some mpl warnings) | diff --git a/pandas/plotting/_matplotlib/misc.py b/pandas/plotting/_matplotlib/misc.py
index a1c62f9fce23c..f519d1e96f5b0 100644
--- a/pandas/plotting/_matplotlib/misc.py
+++ b/pandas/plotting/_matplotlib/misc.py
@@ -144,7 +144,9 @@ def normalize(series):
df = frame.drop(class_column, axis=1).apply(normalize)
... | Backport PR #38574: TST: fix some mpl warnings | https://api.github.com/repos/pandas-dev/pandas/pulls/40801 | 2021-04-06T13:11:05Z | 2021-04-06T15:43:43Z | 2021-04-06T15:43:43Z | 2021-04-06T15:43:43Z |
TYP fixup overload in reset_index | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 5d7a994c4b1f6..2736560def2cb 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -5373,8 +5373,8 @@ def reset_index(
@overload
def reset_index(
self,
- *,
level: Hashable | Sequence[Hashable] | None,
+ *... | If we have `t.py`:
```python
import pandas as pd
inplace: bool
reveal_type(pd.DataFrame([1,2,3]).reset_index(0, inplace=True, col_fill='a'))
```
then on `master`, the last line would be revelead as `Revealed type is 'Union[pandas.core.frame.DataFrame, None]'`. With the current changes, it will be revealed... | https://api.github.com/repos/pandas-dev/pandas/pulls/40798 | 2021-04-06T07:46:05Z | 2021-04-07T16:39:57Z | 2021-04-07T16:39:57Z | 2021-04-07T16:40:00Z |
Revert "DOC/CI: temp pin of decorator (IPython dependency) (#40768)" | diff --git a/environment.yml b/environment.yml
index 136b032e15dbe..feea3445cb4fe 100644
--- a/environment.yml
+++ b/environment.yml
@@ -78,7 +78,6 @@ dependencies:
- bottleneck>=1.2.1
- ipykernel
- ipython>=7.11.1
- - decorator=4 # temporary pin (dependency of IPython), see GH-40768
- jinja2 # pandas.St... | This reverts commit 64f08445ae76bc7d3318d1e46c24254087ed5186.
Reverts #40768, as it is now fixed upstream | https://api.github.com/repos/pandas-dev/pandas/pulls/40797 | 2021-04-06T07:41:50Z | 2021-04-06T11:18:39Z | 2021-04-06T11:18:39Z | 2021-04-06T11:18:42Z |
Enable server side cursors | diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst
index 24f307f23f435..4f721cfff213e 100644
--- a/doc/source/whatsnew/v1.4.0.rst
+++ b/doc/source/whatsnew/v1.4.0.rst
@@ -105,6 +105,7 @@ Deprecations
Performance improvements
~~~~~~~~~~~~~~~~~~~~~~~~
+- Performance improvement in :meth:`io.... | This pull request attempts to fix #35689. I read an article by @itamarst and decided to look further into the codebase. After noticing that the fix semed to be simple I decided file a PR. The fix is naive and I'm not sure the true solution is as simple as I imagine it to be. There are probably many things I'm missing a... | https://api.github.com/repos/pandas-dev/pandas/pulls/40796 | 2021-04-06T04:27:19Z | 2021-09-08T02:18:43Z | null | 2022-02-27T07:23:40Z |
TST: groupby of idxmax/min with mixed types | diff --git a/pandas/tests/frame/test_reductions.py b/pandas/tests/frame/test_reductions.py
index 1304e861f948e..93ebe0aba3bc6 100644
--- a/pandas/tests/frame/test_reductions.py
+++ b/pandas/tests/frame/test_reductions.py
@@ -1025,6 +1025,28 @@ def test_idxmax_mixed_dtype(self):
expected = Series([0, 2, 1, 2], ... | - [x] closes #40346
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry - didn't think this was necessary, just added a test case to a solved problem.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40795 | 2021-04-06T04:23:55Z | 2021-04-14T12:55:40Z | 2021-04-14T12:55:40Z | 2021-04-14T12:55:46Z |
TYP: implement typing.Positional | diff --git a/pandas/_typing.py b/pandas/_typing.py
index 7c74fc54b8d67..d6561176deb71 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -187,3 +187,14 @@
# internals
Manager = Union["ArrayManager", "BlockManager"]
SingleManager = Union["SingleArrayManager", "SingleBlockManager"]
+
+# indexing
+# PositionalIn... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40794 | 2021-04-06T03:41:08Z | 2021-04-08T12:47:18Z | 2021-04-08T12:47:18Z | 2021-04-08T14:28:40Z |
REF: simplify Index.join dispatch/wrapping | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index de6d6c8e07144..66885b098c6ff 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -2,6 +2,7 @@
from copy import copy as copy_func
from datetime import datetime
+import functools
from itertools import zip_longest
... | Handle `return_indexers` in exactly one place. | https://api.github.com/repos/pandas-dev/pandas/pulls/40793 | 2021-04-06T01:56:45Z | 2021-04-07T20:00:24Z | 2021-04-07T20:00:24Z | 2021-04-07T20:04:24Z |
CLN: use ensure_block_shape | diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py
index c3d17d3b400a5..76d247d9804ee 100644
--- a/pandas/core/internals/array_manager.py
+++ b/pandas/core/internals/array_manager.py
@@ -479,8 +479,7 @@ def apply_with_block(self: T, f, align_keys=None, swap_axis=True, **kwargs)... | Broken off from #40149 | https://api.github.com/repos/pandas-dev/pandas/pulls/40792 | 2021-04-05T23:01:32Z | 2021-04-07T20:02:13Z | 2021-04-07T20:02:13Z | 2021-04-07T20:04:49Z |
ENH: Upgrade sql module for SQLAlchemy 2.0 #40686 | diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml
index cedc2b85c2794..a431480d34d29 100644
--- a/.github/workflows/database.yml
+++ b/.github/workflows/database.yml
@@ -16,6 +16,7 @@ env:
PANDAS_CI: 1
PATTERN: ((not slow and not network and not clipboard) or (single and db))
COVERAG... | - [ ] closes #40686
| https://api.github.com/repos/pandas-dev/pandas/pulls/40791 | 2021-04-05T22:21:17Z | 2022-03-16T16:35:53Z | null | 2022-11-18T02:20:48Z |
BUG: groupby.agg/transform casts UDF results | diff --git a/doc/source/user_guide/gotchas.rst b/doc/source/user_guide/gotchas.rst
index 180f833a2753d..1de978b195382 100644
--- a/doc/source/user_guide/gotchas.rst
+++ b/doc/source/user_guide/gotchas.rst
@@ -178,7 +178,7 @@ To test for membership in the values, use the method :meth:`~pandas.Series.isin`
For ``DataFra... | - [x] closes #21240
- [x] closes #17035
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
This PR stops casting when the func is a callable since we can't tell... | https://api.github.com/repos/pandas-dev/pandas/pulls/40790 | 2021-04-05T21:04:14Z | 2021-05-03T00:04:56Z | 2021-05-03T00:04:56Z | 2021-05-08T21:59:15Z |
BUG: RollingGroupby ignored as_index=False | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 728288b686b05..c9267a756bef3 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -780,6 +780,7 @@ Groupby/resample/rolling
- :class:`core.window.ewm.ExponentialMovingWindow` now raises a ``NotImplementedE... | - [x] closes #39433
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40789 | 2021-04-05T18:18:30Z | 2021-04-09T19:42:45Z | 2021-04-09T19:42:45Z | 2021-04-10T05:24:41Z |
REF: share methods between ExtensionBlock, NDArrayBackedExtensionBlock | diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index c4c70851bd54a..652a97fdad2e8 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -1354,6 +1354,31 @@ def delete(self, loc) -> None:
# _cache not yet initialized
pass
+ @c... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40787 | 2021-04-05T16:55:42Z | 2021-04-07T20:47:47Z | 2021-04-07T20:47:47Z | 2021-04-07T21:35:39Z |
future annotations | diff --git a/pandas/_config/config.py b/pandas/_config/config.py
index 47913c2a1cf7d..455f800073c15 100644
--- a/pandas/_config/config.py
+++ b/pandas/_config/config.py
@@ -48,6 +48,8 @@
"""
+from __future__ import annotations
+
from collections import namedtuple
from contextlib import (
ContextDecorator,
@... | - [x] closes #40533
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them | https://api.github.com/repos/pandas-dev/pandas/pulls/40785 | 2021-04-05T16:26:07Z | 2021-04-13T12:13:36Z | 2021-04-13T12:13:36Z | 2021-09-30T15:27:38Z |
CI, STYLE sync flake8 versions | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7988012498db7..b6df108a3166c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -69,6 +69,7 @@ repos:
rev: v1.2.2
hooks:
- id: yesqa
+ additional_dependencies: [flake8==3.9.0]
- repo: local
hooks:
... | There's been a couple of recent CI failures due to differences in flake8 versions: #40481, #40457
CI failures due to style checks are really annoying, so I think it's worth adding a check to ensure they're in-sync. There's already a hook with `pyyaml` as additional dependency, so that environment will be reused for ... | https://api.github.com/repos/pandas-dev/pandas/pulls/40783 | 2021-04-05T13:59:54Z | 2021-04-09T19:46:59Z | 2021-04-09T19:46:59Z | 2021-04-09T19:51:08Z |
CI, STYLE Consolidate pygrep checks | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index c63f50b3c1421..057457e6d183e 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -90,11 +90,6 @@ repos:
entry: python scripts/check_for_inconsistent_pandas_namespace.py
language: python
types: [python]
- ... | These checks can be consolidated using multi-line expressions and verbose regex
I think this should make it easier to extend them, so it should be straightforward to port over the remaining ones in code_checks.sh without having to keep increasing the number of hooks
It also reduces the total number of distinct ch... | https://api.github.com/repos/pandas-dev/pandas/pulls/40782 | 2021-04-05T10:43:49Z | 2021-04-05T13:08:04Z | 2021-04-05T13:08:04Z | 2021-04-05T13:21:52Z |
PERF: avoid doing check at each step in loop | diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py
index 4b68717763d87..d3273d7f13a4d 100644
--- a/pandas/core/groupby/ops.py
+++ b/pandas/core/groupby/ops.py
@@ -336,7 +336,7 @@ def get_iterator(
"""
splitter = self._get_splitter(data, axis=axis)
keys = self._get_group_keys... | no measured perf difference, but its the principle of the thing | https://api.github.com/repos/pandas-dev/pandas/pulls/40780 | 2021-04-05T03:40:10Z | 2021-04-05T13:09:10Z | 2021-04-05T13:09:10Z | 2021-04-05T14:26:01Z |
CLN: ensure_int64->ensure_platform_int | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 6f8cea8008850..a8f6443ff4712 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -71,8 +71,8 @@
)
from pandas.core.dtypes.common import (
- ensure_int64,
ensure_object,
+ ensure_platform_int,
ensure_str,
is_bool,... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40778 | 2021-04-04T16:50:54Z | 2021-04-09T03:33:04Z | 2021-04-09T03:33:04Z | 2021-04-09T03:37:42Z |
Fix legend yerr | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 75b2dee4a5822..df5647f8d78a4 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -694,7 +694,9 @@ Plotting
- Bug in :func:`scatter_matrix` raising when 2d ``ax`` argument passed (:issue:`16253`)
- Prev... | - [x] closes #40044
- [x] xref #39522
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
I spent several hours on this, and I don't think there's a simple solut... | https://api.github.com/repos/pandas-dev/pandas/pulls/40777 | 2021-04-04T13:59:26Z | 2021-04-09T00:52:25Z | 2021-04-09T00:52:24Z | 2021-04-09T07:36:47Z |
REF: move Series-specific methods from NDFrame | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index d1d1993931062..c9869a7799437 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -3424,7 +3424,7 @@ def __getitem__(self, key):
# - we have a MultiIndex on columns (test on self.columns, #21309)
if data.shape[1] == 1 an... | This makes it easier to identify BlockManager methods which are 1D/2D-specific, which lets us push further on #40625 | https://api.github.com/repos/pandas-dev/pandas/pulls/40776 | 2021-04-04T02:32:38Z | 2021-04-08T12:55:38Z | 2021-04-08T12:55:38Z | 2021-04-08T14:40:11Z |
TYP/CLN: factorize_from_iterable(s) | diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py
index 32c3095c3e6ee..fe08ea418493e 100644
--- a/pandas/core/arrays/categorical.py
+++ b/pandas/core/arrays/categorical.py
@@ -11,6 +11,7 @@
List,
Optional,
Sequence,
+ Tuple,
Type,
TypeVar,
Union,
@@ -264... | `factorize_from_iterable` didn't return an `CategoricalIndex`, if its input was a categorical-like. Instead it returned a plain `Categorical`. This PR fixes that + adds return types.
Also makes the return value for `factorize_from_iterables` clearer and easier to read.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40775 | 2021-04-04T01:47:31Z | 2021-04-05T15:24:48Z | 2021-04-05T15:24:48Z | 2021-04-05T16:28:57Z |
STY: remove --keep-runtime-typing from pyupgrade Part-1 | diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py
index 9bacb30b78a64..63c9ebb1dd98d 100644
--- a/pandas/_testing/__init__.py
+++ b/pandas/_testing/__init__.py
@@ -14,8 +14,6 @@
ContextManager,
Counter,
Iterable,
- List,
- Type,
)
import warnings
@@ -116,24 +114,24 @@
_N =... | - [x] xref #40759
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40773 | 2021-04-03T19:34:15Z | 2021-04-06T15:51:42Z | 2021-04-06T15:51:41Z | 2021-04-06T15:51:42Z |
TYP: lib.pyi | diff --git a/pandas/_libs/lib.pyi b/pandas/_libs/lib.pyi
new file mode 100644
index 0000000000000..477c9fd655a4a
--- /dev/null
+++ b/pandas/_libs/lib.pyi
@@ -0,0 +1,200 @@
+# TODO(npdtypes): Many types specified here can be made more specific/accurate;
+# the more specific versions are specified in comments
+
+from ty... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40772 | 2021-04-03T19:31:33Z | 2021-04-08T13:40:02Z | 2021-04-08T13:40:02Z | 2021-04-09T10:56:52Z |
BUG: remove part of error handler #40729 | diff --git a/pandas/core/arrays/floating.py b/pandas/core/arrays/floating.py
index fdd358a1b3856..44f4af8ffd680 100644
--- a/pandas/core/arrays/floating.py
+++ b/pandas/core/arrays/floating.py
@@ -10,10 +10,7 @@
import numpy as np
-from pandas._libs import (
- lib,
- missing as libmissing,
-)
+from pandas._l... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40771 | 2021-04-03T17:34:36Z | 2021-04-03T18:24:40Z | null | 2021-04-03T18:24:45Z |
EHN: multi-column explode | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 1a5a9980e5e96..46ecce77798ef 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -274,6 +274,7 @@ Other enhancements
- Add keyword ``dropna`` to :meth:`DataFrame.value_counts` to allow counting rows that ... | - [x] closes #39240
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40770 | 2021-04-03T14:21:41Z | 2021-06-21T13:06:25Z | 2021-06-21T13:06:25Z | 2021-06-21T13:06:44Z |
DOC/CI: temp pin of decorator (IPython dependency) | diff --git a/environment.yml b/environment.yml
index feea3445cb4fe..136b032e15dbe 100644
--- a/environment.yml
+++ b/environment.yml
@@ -78,6 +78,7 @@ dependencies:
- bottleneck>=1.2.1
- ipykernel
- ipython>=7.11.1
+ - decorator=4 # temporary pin (dependency of IPython), see GH-40768
- jinja2 # pandas.St... | The doc builds are failing since yesterday (in enhancingperf.rst, where using the cython ipython magic). By comparing the env from the last working / first failing build on master, one of the differences is a version bump of the `decorator` package, which is a dependency of IPython.
So checking if pinning this packa... | https://api.github.com/repos/pandas-dev/pandas/pulls/40768 | 2021-04-03T06:57:48Z | 2021-04-03T09:49:28Z | 2021-04-03T09:49:28Z | 2021-04-06T16:03:01Z |
BUG: incorrect rounding in groupby.cummin near int64 implementation bounds | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index f132cdf6bbf6e..2f0ff731ebce3 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -791,7 +791,7 @@ Groupby/resample/rolling
- Bug in aggregation functions for :class:`DataFrame` not respecting ``numeric_on... | - [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
xref #40719
| https://api.github.com/repos/pandas-dev/pandas/pulls/40767 | 2021-04-03T04:33:24Z | 2021-04-14T12:56:24Z | 2021-04-14T12:56:24Z | 2021-04-14T14:14:30Z |
TYP: timedeltas.pyi | diff --git a/pandas/_libs/tslibs/timedeltas.pyi b/pandas/_libs/tslibs/timedeltas.pyi
new file mode 100644
index 0000000000000..9ccc3a8ed5fa4
--- /dev/null
+++ b/pandas/_libs/tslibs/timedeltas.pyi
@@ -0,0 +1,100 @@
+from datetime import timedelta
+from typing import (
+ ClassVar,
+ Type,
+ TypeVar,
+ overloa... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
@simonjayhawkins mypy is unhappy about `Timedelta.__new__` potentially returning `NaT`. Th... | https://api.github.com/repos/pandas-dev/pandas/pulls/40766 | 2021-04-03T04:26:55Z | 2021-04-14T14:25:47Z | 2021-04-14T14:25:47Z | 2021-04-14T14:27:38Z |
CLN/TYP: _libs | diff --git a/pandas/_libs/groupby.pyx b/pandas/_libs/groupby.pyx
index e7cd7cd898d5b..48ee01c809efd 100644
--- a/pandas/_libs/groupby.pyx
+++ b/pandas/_libs/groupby.pyx
@@ -106,7 +106,7 @@ def group_median_float64(ndarray[float64_t, ndim=2] out,
ndarray[int64_t] counts,
... | mercifully getting towards the end of these | https://api.github.com/repos/pandas-dev/pandas/pulls/40765 | 2021-04-03T03:51:47Z | 2021-04-05T14:56:17Z | 2021-04-05T14:56:17Z | 2021-04-05T15:53:09Z |
Bug in loc not ordering rhs correctly for mixed indexer | diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py
index fb542711329b4..82971e460a8a2 100644
--- a/pandas/core/indexing.py
+++ b/pandas/core/indexing.py
@@ -1873,7 +1873,11 @@ def _setitem_single_column(self, loc: int, value, plane_indexer):
if com.is_null_slice(pi) or com.is_full_slice(pi, len(sel... | - [x] closes #40480
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
| https://api.github.com/repos/pandas-dev/pandas/pulls/40764 | 2021-04-02T22:42:54Z | 2021-04-13T23:19:56Z | 2021-04-13T23:19:56Z | 2021-11-01T23:14:41Z |
BUG: Series.__delitem__ converting EAs to ndarrays | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 75b2dee4a5822..49ddeb23e3193 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -642,6 +642,7 @@ Indexing
- Bug in setting ``numpy.timedelta64`` values into an object-dtype :class:`Series` using a boolea... | - [x] closes #40386
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40763 | 2021-04-02T22:14:08Z | 2021-04-05T16:19:43Z | 2021-04-05T16:19:43Z | 2021-04-05T16:21:39Z |
DOC: collapse subpages in sidebar for API reference docs | diff --git a/doc/_templates/sidebar-nav-bs.html b/doc/_templates/sidebar-nav-bs.html
new file mode 100644
index 0000000000000..7e0043e771e72
--- /dev/null
+++ b/doc/_templates/sidebar-nav-bs.html
@@ -0,0 +1,9 @@
+<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
+ <div class="bd-toc-item active">
+ ... | The latest version of the theme added the capability to collapse/expand subsections in the sidebar (without directly navigating to the page), see eg the new dropdown arrows on https://pandas.pydata.org/docs/dev/getting_started/index.html
But, an unintended consequence is that the build takes*much* longer (this the r... | https://api.github.com/repos/pandas-dev/pandas/pulls/40761 | 2021-04-02T19:29:52Z | 2021-04-13T12:24:53Z | 2021-04-13T12:24:53Z | 2023-07-10T08:52:25Z |
TYP: libalgos.pyi | diff --git a/pandas/_libs/algos.pyi b/pandas/_libs/algos.pyi
new file mode 100644
index 0000000000000..30a31d17fc947
--- /dev/null
+++ b/pandas/_libs/algos.pyi
@@ -0,0 +1,293 @@
+# Note: this covers algos.pyx and algos_common_helper but NOT algos_take_helper
+from typing import Any
+
+import numpy as np
+
+class Infini... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40760 | 2021-04-02T18:38:31Z | 2021-04-08T12:53:37Z | 2021-04-08T12:53:37Z | 2021-04-08T14:26:44Z |
TYP: fix type:ignores | diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py
index 7be06fe92c418..25939bcdc7c6a 100644
--- a/pandas/core/arrays/datetimelike.py
+++ b/pandas/core/arrays/datetimelike.py
@@ -1732,8 +1732,8 @@ def _round(self, freq, mode, ambiguous, nonexistent):
values = self.view("i8")
... | In some cases these are pre-emptive for things that pop up when not-yet-pushed .pyi files are implemented | https://api.github.com/repos/pandas-dev/pandas/pulls/40758 | 2021-04-02T17:47:42Z | 2021-04-05T14:56:59Z | 2021-04-05T14:56:59Z | 2021-04-05T15:52:27Z |
REF: implement libinternals.NumpyBlock | diff --git a/pandas/_libs/internals.pyi b/pandas/_libs/internals.pyi
index 446ee299698c5..d35d414aaa012 100644
--- a/pandas/_libs/internals.pyi
+++ b/pandas/_libs/internals.pyi
@@ -6,7 +6,10 @@ from typing import (
import numpy as np
-from pandas._typing import ArrayLike
+from pandas._typing import (
+ ArrayLik... | on its own this is perf-neutral. It is in conjunction with implementing BlockManager.get_slice in cython that i see real gains | https://api.github.com/repos/pandas-dev/pandas/pulls/40757 | 2021-04-02T17:20:06Z | 2021-04-08T12:46:05Z | 2021-04-08T12:46:05Z | 2021-04-08T14:31:38Z |
CLN: remove maybe_upcast_putmask | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index edc43bc68b2a8..3f3d9f9f2833b 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -498,55 +498,6 @@ def maybe_cast_to_extension_array(
return result
-def maybe_upcast_putmask(result: np.ndarray, mask: np.ndarray) ... | The last non-test usage of this is made unnecessary by #40728 | https://api.github.com/repos/pandas-dev/pandas/pulls/40756 | 2021-04-02T17:08:58Z | 2021-04-02T18:18:43Z | 2021-04-02T18:18:43Z | 2021-04-02T18:58:08Z |
TST: [ArrowStringArray] more parameterised testing - part 3 | diff --git a/pandas/tests/io/formats/test_to_csv.py b/pandas/tests/io/formats/test_to_csv.py
index 5e599818308b8..bbf78a9013731 100644
--- a/pandas/tests/io/formats/test_to_csv.py
+++ b/pandas/tests/io/formats/test_to_csv.py
@@ -204,12 +204,17 @@ def test_to_csv_na_rep(self):
assert df.set_index("a").to_csv(na... | https://api.github.com/repos/pandas-dev/pandas/pulls/40755 | 2021-04-02T16:03:52Z | 2021-04-09T07:45:16Z | 2021-04-09T07:45:16Z | 2021-04-09T08:54:13Z | |
TST: use a few unused loop variables | diff --git a/pandas/tests/indexes/datetimes/test_misc.py b/pandas/tests/indexes/datetimes/test_misc.py
index eff87a2b3f275..c3736d588601b 100644
--- a/pandas/tests/indexes/datetimes/test_misc.py
+++ b/pandas/tests/indexes/datetimes/test_misc.py
@@ -366,6 +366,7 @@ def test_datetime_name_accessors(self, time_locale):
... | part of #40570
| https://api.github.com/repos/pandas-dev/pandas/pulls/40752 | 2021-04-02T14:05:44Z | 2021-04-02T22:41:20Z | 2021-04-02T22:41:20Z | 2021-06-05T20:50:12Z |
TST: [ArrowStringArray] more parameterised testing - part 2 | diff --git a/pandas/conftest.py b/pandas/conftest.py
index 3fdde3261bd68..35affa62ccf68 100644
--- a/pandas/conftest.py
+++ b/pandas/conftest.py
@@ -1144,6 +1144,8 @@ def nullable_string_dtype(request):
* 'string'
* 'arrow_string'
"""
+ from pandas.core.arrays.string_arrow import ArrowStringDtype # n... | only a few tests updated in this PR to ensure this approach is accepted.
if we try to add directly to the parametrization of the existing tests we get `ImportError` on environments without pyarrow installed. https://github.com/pandas-dev/pandas/pull/40679#discussion_r603345758 | https://api.github.com/repos/pandas-dev/pandas/pulls/40749 | 2021-04-02T13:01:32Z | 2021-04-15T09:31:34Z | 2021-04-15T09:31:34Z | 2021-04-15T10:35:47Z |
DOC: [ArrowStringArray] release note and other documentation | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index f10b8f602ea56..0680e9d360c8f 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -134,6 +134,56 @@ a copy will no longer be made (:issue:`32960`)
The default behavior when not passing ``copy`` will remain... | extremely draft status. placeholder for discussion.
we may want to combine this with #39908, and merge #40708 before #39908
#39908 makes changes to the user facing api that affects the existing StringDtype so that may need an separate section in the release notes.
other sections of the documentation may also n... | https://api.github.com/repos/pandas-dev/pandas/pulls/40747 | 2021-04-02T12:05:58Z | 2021-05-01T12:14:47Z | null | 2021-05-01T12:14:47Z |
ENH: Set column to work for datetimes for Xlsxwriter | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 75b2dee4a5822..f3ddcca81376a 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -682,6 +682,7 @@ I/O
- Bug in :func:`read_hdf` returning unexpected records when filtering on categorical string columns us... | - [x] closes #30275
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry
Enhancement for Xlsxwriter to enable the usage of `set_column` for datetime columns for se... | https://api.github.com/repos/pandas-dev/pandas/pulls/40746 | 2021-04-02T11:36:23Z | 2021-04-30T06:26:33Z | null | 2021-05-01T01:10:49Z |
CLN: create core Styler rendering functions and subclass conditional styling applications | diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py
index 267606461f003..587a167708468 100644
--- a/pandas/io/formats/style.py
+++ b/pandas/io/formats/style.py
@@ -3,31 +3,19 @@
"""
from __future__ import annotations
-from collections import defaultdict
from contextlib import contextmanager
impor... | Here is a first draft at splitting up `style.py`, ahead of adding new LaTeX functionality
### Key Points
- All rendering and formatting methods moved to `style_render.py`:
```
class StylerRenderer:
jinja2_loader
def render()
def format()
def _translate()
def _compute()
+ their mod... | https://api.github.com/repos/pandas-dev/pandas/pulls/40745 | 2021-04-02T10:45:13Z | 2021-04-12T14:49:33Z | 2021-04-12T14:49:33Z | 2021-04-12T15:00:22Z |
TYP: indexes | diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py
index 32d6279250fe2..1be2ec0dd92d7 100644
--- a/pandas/core/arrays/datetimes.py
+++ b/pandas/core/arrays/datetimes.py
@@ -190,7 +190,7 @@ class DatetimeArray(dtl.TimelikeOps, dtl.DatelikeOps):
_infer_matches = ("datetime", "datetime64",... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/40744 | 2021-04-02T03:27:00Z | 2021-04-13T17:16:26Z | 2021-04-13T17:16:26Z | 2021-04-13T17:19:40Z |
STY: enable subset of flake8-bugbear | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5bfceec6605c0..b8524a302f4c9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -36,7 +36,7 @@ repos:
rev: 3.9.0
hooks:
- id: flake8
- additional_dependencies: [flake8-comprehensions>=3.1.0]
+ addition... | part of #40570
| https://api.github.com/repos/pandas-dev/pandas/pulls/40743 | 2021-04-02T01:04:21Z | 2021-04-02T02:57:31Z | 2021-04-02T02:57:31Z | 2021-06-05T20:50:20Z |
Revert "PERF: numexpr doesn't support floordiv, so don't try (#40727)" | diff --git a/pandas/core/computation/expressions.py b/pandas/core/computation/expressions.py
index 43b6a6fb64314..8205534c9d48b 100644
--- a/pandas/core/computation/expressions.py
+++ b/pandas/core/computation/expressions.py
@@ -128,9 +128,8 @@ def _evaluate_numexpr(op, op_str, a, b):
roperator.rsub: "-",
ope... | This reverts commit e6f7e7b20ebb1512d6debee5e8592b0b5351ac49.
| https://api.github.com/repos/pandas-dev/pandas/pulls/40742 | 2021-04-01T22:47:14Z | 2021-04-01T22:47:26Z | 2021-04-01T22:47:26Z | 2021-04-01T22:47:26Z |
BUG: DTBlock/TDBlock.delete casting to ndarray | diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index a77ea61d9e6de..5ad7e391c2b86 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -280,6 +280,11 @@ def make_block_same_class(
""" Wrap given values in a block of same type as self. """
... | - [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry
xref #40386 (does not close) | https://api.github.com/repos/pandas-dev/pandas/pulls/40741 | 2021-04-01T21:07:39Z | 2021-04-02T01:47:09Z | 2021-04-02T01:47:09Z | 2021-04-02T02:24:12Z |
Backport PR #40718 on branch 1.2.x (COMPAT: matplotlib 3.4.0) | diff --git a/pandas/plotting/_matplotlib/compat.py b/pandas/plotting/_matplotlib/compat.py
index 964596d9b6319..729d2bf1f019a 100644
--- a/pandas/plotting/_matplotlib/compat.py
+++ b/pandas/plotting/_matplotlib/compat.py
@@ -22,3 +22,4 @@ def inner():
mpl_ge_3_1_0 = _mpl_version("3.1.0", operator.ge)
mpl_ge_3_2_0 = _... | Backport PR #40718: COMPAT: matplotlib 3.4.0 | https://api.github.com/repos/pandas-dev/pandas/pulls/40739 | 2021-04-01T19:28:19Z | 2021-04-06T13:28:20Z | 2021-04-06T13:28:19Z | 2021-04-06T13:29:00Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.