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/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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
TST: refactored tests to use parametrize instead of "for" loop | diff --git a/pandas/tests/generic/test_series.py b/pandas/tests/generic/test_series.py
index 823ce7435f229..6e5cb3add43df 100644
--- a/pandas/tests/generic/test_series.py
+++ b/pandas/tests/generic/test_series.py
@@ -52,33 +52,46 @@ def test_nonzero_single_element(self):
s = Series([False])
assert not... | - [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/41195 | 2021-04-28T13:37:44Z | 2021-05-03T12:49:04Z | 2021-05-03T12:49:04Z | 2021-05-03T13:15:35Z |
REF: tests.indexes.numeric.py | diff --git a/pandas/tests/indexes/categorical/test_category.py b/pandas/tests/indexes/categorical/test_category.py
index 678344f5b6909..dc6fb9910161c 100644
--- a/pandas/tests/indexes/categorical/test_category.py
+++ b/pandas/tests/indexes/categorical/test_category.py
@@ -17,13 +17,17 @@
class TestCategoricalIndex... | This PR ensures that all index instantiation calls in `tests.indexes.numeric.py` use the `_holder` class variable instead of the actual index class. This will make it easier to extend the existing tests to tests for the new `NumIndex` in #41153.
Also renames `_holder` to `_index_cls` for all of `tests.indexes`. I th... | https://api.github.com/repos/pandas-dev/pandas/pulls/41192 | 2021-04-28T08:59:23Z | 2021-04-30T18:52:55Z | 2021-04-30T18:52:55Z | 2021-04-30T19:52:23Z |
CLN: reindex_axis remove unnecessary args, always copy=False | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 8628429f18b05..eba4a36315ba4 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -246,14 +246,18 @@ def __init__(
@classmethod
def _init_mgr(
- cls, mgr, axes, dtype: Dtype | None = None, copy: bool_t = False
+ ... | - [ ] 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/41190 | 2021-04-28T01:10:51Z | 2021-04-28T15:19:43Z | 2021-04-28T15:19:43Z | 2021-04-28T15:51:05Z |
CLN: unnecessary checks in internals.concat | diff --git a/pandas/core/internals/concat.py b/pandas/core/internals/concat.py
index 51a381a1b7f4f..9642b30ab91ca 100644
--- a/pandas/core/internals/concat.py
+++ b/pandas/core/internals/concat.py
@@ -43,7 +43,6 @@
import pandas.core.algorithms as algos
from pandas.core.arrays import (
- Categorical,
Dateti... | https://api.github.com/repos/pandas-dev/pandas/pulls/41189 | 2021-04-27T23:33:58Z | 2021-04-29T22:07:22Z | 2021-04-29T22:07:22Z | 2021-04-29T22:13:12Z | |
WEB add phofl to maintainers list | diff --git a/web/pandas/config.yml b/web/pandas/config.yml
index 9a178d26659c3..9da7d3bbe8ab6 100644
--- a/web/pandas/config.yml
+++ b/web/pandas/config.yml
@@ -86,6 +86,7 @@ maintainers:
- dsaxton
- MarcoGorelli
- rhshadrach
+ - phofl
emeritus:
- Wouter Overmeire
- Skipper Seabold
| Am I OK to add a checklist (which would probably only have about 3 items: add to pandas-dev team on GitHub, add to mailing group, list on website) to the Wiki for next someone's added? | https://api.github.com/repos/pandas-dev/pandas/pulls/41187 | 2021-04-27T20:29:38Z | 2021-04-28T01:13:08Z | 2021-04-28T01:13:08Z | 2021-05-03T11:10:16Z |
Deprecate inplace in Categorical.rename_categories | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 7189c6e68d53d..563addb8e1f1d 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -609,7 +609,7 @@ Deprecations
- Deprecated using :func:`merge` or :func:`join` on a different number of levels (:issue:`348... | - [x] xref #37643
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/41186 | 2021-04-27T19:28:32Z | 2021-05-02T23:50:11Z | 2021-05-02T23:50:11Z | 2021-05-02T23:50:22Z |
TYP: Overload concat | diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py
index 1686d69bfcb61..c6be9e5886a1d 100644
--- a/pandas/core/arrays/categorical.py
+++ b/pandas/core/arrays/categorical.py
@@ -2310,10 +2310,11 @@ def describe(self):
counts = self.value_counts(dropna=False)
freqs = coun... | - [ ] Closes part of MarcoGorelli/pyladieslondon-sprints#29
- [ ] Adds typing.overload to: `concat` from https://github.com/pandas-dev/pandas/blob/master/pandas/core/reshape/concat.py
## `mypy` Setup and Sutput
```python
# t.py
import pandas as pd
from pandas._typing import Axis
from pandas.core.generic import... | https://api.github.com/repos/pandas-dev/pandas/pulls/41184 | 2021-04-27T19:10:01Z | 2021-08-22T14:00:45Z | 2021-08-22T14:00:45Z | 2021-08-22T14:00:45Z |
improved dataframe example to avoid confusion | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 7f970a72cb12c..129dbe52c5885 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -9803,9 +9803,9 @@ def _get_data() -> DataFrame:
def nunique(self, axis: Axis = 0, dropna: bool = True) -> Series:
"""
- Count distinct obser... | - [x] closes #41180
- [ ] 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/41182 | 2021-04-27T15:31:20Z | 2021-05-07T05:00:27Z | 2021-05-07T05:00:26Z | 2021-05-07T12:31:37Z |
TYP: cleanup typing in core.indexes.range.py | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index 9b3f2d191831d..1bae9947bd875 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -5874,7 +5874,7 @@ def slice_locs(self, start=None, end=None, step=None, kind=None):
return start_slice, end_slice
- def... | clean-up of typing issues. | https://api.github.com/repos/pandas-dev/pandas/pulls/41179 | 2021-04-27T14:34:14Z | 2021-04-30T18:51:13Z | 2021-04-30T18:51:13Z | 2021-04-30T19:52:06Z |
TST: run frame/series arithmetic tests with+without numexpr | diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py
index 90a9bede40a6b..3c8941c6361e0 100644
--- a/pandas/tests/frame/test_arithmetic.py
+++ b/pandas/tests/frame/test_arithmetic.py
@@ -17,6 +17,7 @@
)
import pandas._testing as tm
import pandas.core.common as com
+from pandas.c... | Follow-up on https://github.com/pandas-dev/pandas/pull/40463, doing the same for the `test_arithmetic.py` for frame and series. | https://api.github.com/repos/pandas-dev/pandas/pulls/41178 | 2021-04-27T08:45:35Z | 2021-04-29T22:06:42Z | 2021-04-29T22:06:42Z | 2021-04-30T17:06:05Z |
DEPR: Deprecate convert_float | diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst
index d26e511202f9c..8897dc7301eab 100644
--- a/doc/source/user_guide/io.rst
+++ b/doc/source/user_guide/io.rst
@@ -3684,15 +3684,6 @@ one can pass an :class:`~pandas.io.excel.ExcelWriter`.
df1.to_excel(writer, sheet_name="Sheet1")
... | - [x] closes #41127
- [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 added tm.assert_produces_warning for every existing test that uses the `convert_float` a... | https://api.github.com/repos/pandas-dev/pandas/pulls/41176 | 2021-04-27T04:08:55Z | 2021-05-26T11:57:43Z | 2021-05-26T11:57:43Z | 2021-05-26T17:03:09Z |
PERF: implement NDArrayBackedBlock | diff --git a/pandas/_libs/arrays.pxd b/pandas/_libs/arrays.pxd
new file mode 100644
index 0000000000000..737da29da46a4
--- /dev/null
+++ b/pandas/_libs/arrays.pxd
@@ -0,0 +1,11 @@
+
+from numpy cimport ndarray
+
+
+cdef class NDArrayBacked:
+ cdef:
+ readonly ndarray _ndarray
+ readonly object _dtype
+... | - [ ] 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/41175 | 2021-04-27T00:48:03Z | 2021-05-06T01:36:22Z | 2021-05-06T01:36:22Z | 2021-05-06T02:02:10Z |
TST: Regression test for #33765 | diff --git a/pandas/tests/frame/test_arithmetic.py b/pandas/tests/frame/test_arithmetic.py
index 90a9bede40a6b..9c95b2f944d18 100644
--- a/pandas/tests/frame/test_arithmetic.py
+++ b/pandas/tests/frame/test_arithmetic.py
@@ -12,6 +12,7 @@
import pandas as pd
from pandas import (
DataFrame,
+ Index,
Multi... | - [x] closes #33765
- [ ] 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/41169 | 2021-04-26T20:23:12Z | 2021-04-29T23:34:46Z | 2021-04-29T23:34:45Z | 2021-05-03T11:40:47Z |
TYP: overload lib.maybe_convert_objects | diff --git a/pandas/_libs/lib.pyi b/pandas/_libs/lib.pyi
index 4c647056641f5..8af7c1a026fc6 100644
--- a/pandas/_libs/lib.pyi
+++ b/pandas/_libs/lib.pyi
@@ -5,6 +5,8 @@ from typing import (
Any,
Callable,
Generator,
+ Literal,
+ overload,
)
import numpy as np
@@ -51,7 +53,7 @@ def is_float_arra... | https://api.github.com/repos/pandas-dev/pandas/pulls/41166 | 2021-04-26T18:04:12Z | 2021-04-28T19:31:26Z | 2021-04-28T19:31:26Z | 2021-04-28T19:44:36Z | |
[ArrayManager] TST: remove more ArrayManager skips for JSON IO | diff --git a/pandas/tests/io/formats/test_printing.py b/pandas/tests/io/formats/test_printing.py
index 24d1973eeda6d..f0d5ef19c4468 100644
--- a/pandas/tests/io/formats/test_printing.py
+++ b/pandas/tests/io/formats/test_printing.py
@@ -3,8 +3,6 @@
import pandas._config.config as cf
-import pandas.util._test_decor... | Some more JSON skips that I missed in https://github.com/pandas-dev/pandas/pull/41081 can now be removed
xref https://github.com/pandas-dev/pandas/issues/39146 | https://api.github.com/repos/pandas-dev/pandas/pulls/41164 | 2021-04-26T10:01:37Z | 2021-04-26T11:48:01Z | 2021-04-26T11:48:01Z | 2021-04-26T11:53:42Z |
PERF: numexpr doesn't support floordiv, so don't try | diff --git a/pandas/core/computation/expressions.py b/pandas/core/computation/expressions.py
index a8852ae06f578..2f87e0bcce70a 100644
--- a/pandas/core/computation/expressions.py
+++ b/pandas/core/computation/expressions.py
@@ -142,8 +142,9 @@ def _evaluate_numexpr(op, op_str, a, b):
roperator.rsub: "-",
ope... | Re-take of https://github.com/pandas-dev/pandas/pull/40727, see that PR for explanation.
Tests will still be failing (so don't merge yet ;)), but depend on #41161 to be fixed | https://api.github.com/repos/pandas-dev/pandas/pulls/41163 | 2021-04-26T08:25:05Z | 2021-04-28T12:35:50Z | 2021-04-28T12:35:50Z | 2021-04-28T12:56:13Z |
REF: move check for disallowed bool arithmetic ops out of numexpr-related expressions.py | diff --git a/pandas/core/computation/expressions.py b/pandas/core/computation/expressions.py
index 957a493925405..a8852ae06f578 100644
--- a/pandas/core/computation/expressions.py
+++ b/pandas/core/computation/expressions.py
@@ -114,6 +114,11 @@ def _evaluate_numexpr(op, op_str, a, b):
# numexpr raises eg ... | The current `_bool_arith_check` helper function in `expressions.py` does 2 things: 1) check for operations we do not allow in pandas for boolean data (division, power) and 2) check for ops that are not supported by numexpr but have a pure python fallback.
That first aspect is not related to numexpr, though: we alway... | https://api.github.com/repos/pandas-dev/pandas/pulls/41161 | 2021-04-26T08:10:52Z | 2021-04-28T10:22:27Z | 2021-04-28T10:22:27Z | 2021-04-28T10:22:30Z |
⬆️ UPGRADE: Autoupdate pre-commit config | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1fbd3cf85383e..3078619ecac35 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -19,14 +19,14 @@ repos:
types_or: [python, rst, markdown]
files: ^(pandas|doc)/
- repo: https://github.com/pre-commit/pre-commit-ho... | <!-- START pr-commits -->
<!-- END pr-commits -->
## Base PullRequest
⬆️ UPGRADE: Autoupdate pre-commit config (#41160)
## Command results
<details>
<summary>Details: </summary>
<details>
<summary><em>add path</em></summary>
```Shell
/home/runner/work/_actions/technote-space/create-pr-action/v2/node_modules/npm-ch... | https://api.github.com/repos/pandas-dev/pandas/pulls/41160 | 2021-04-26T07:17:12Z | 2021-05-25T20:09:27Z | 2021-05-25T20:09:27Z | 2021-05-25T20:09:30Z |
Min max sparse | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 7189c6e68d53d..6f169b2f73242 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -877,7 +877,7 @@ Sparse
- Bug in :meth:`DataFrame.sparse.to_coo` raising ``KeyError`` with columns that are a numeric :cl... | - [x] closes #40921
- [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/41159 | 2021-04-26T07:16:41Z | 2021-04-28T15:18:04Z | 2021-04-28T15:18:04Z | 2021-04-28T19:16:59Z |
TST: add test-data.xml to gitignore | diff --git a/.gitignore b/.gitignore
index b682d93efbd04..2c337be60e94e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -104,6 +104,7 @@ asv_bench/env/
asv_bench/html/
asv_bench/results/
asv_bench/pandas/
+test-data.xml
# Documentation generated files #
#################################
| followup #40656
| https://api.github.com/repos/pandas-dev/pandas/pulls/41156 | 2021-04-26T01:08:10Z | 2021-04-26T11:09:43Z | 2021-04-26T11:09:43Z | 2022-11-18T02:21:53Z |
REGR: isin raising TypeError for RangeIndex | diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py
index 6f906cf8879ff..ed51bb8034419 100644
--- a/pandas/core/algorithms.py
+++ b/pandas/core/algorithms.py
@@ -466,7 +466,7 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
# Avoid raising in extract_array
values = ... | - [x] closes #41151
- [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
This was easier than I've expected
cc @attack68 | https://api.github.com/repos/pandas-dev/pandas/pulls/41155 | 2021-04-25T21:39:17Z | 2021-04-26T12:03:04Z | 2021-04-26T12:03:03Z | 2021-04-26T12:06:02Z |
TST: Added iloc tests for casting from object to numeric dtypes for duplicate columns | diff --git a/pandas/tests/indexing/test_iloc.py b/pandas/tests/indexing/test_iloc.py
index 853c7079a3c1b..ad0d4245d58c3 100644
--- a/pandas/tests/indexing/test_iloc.py
+++ b/pandas/tests/indexing/test_iloc.py
@@ -1186,6 +1186,21 @@ def test_iloc_setitem_series_duplicate_columns(self):
df.iloc[:, 0] = df.iloc[:... | - [x] closes #22035
- [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/41154 | 2021-04-25T21:09:02Z | 2021-04-30T00:33:12Z | 2021-04-30T00:33:11Z | 2021-04-30T12:11:19Z |
ENH: NumericIndex for any numpy int/uint/float dtype | diff --git a/pandas/_libs/join.pyx b/pandas/_libs/join.pyx
index eefa16d23f576..b6acf8914c0a6 100644
--- a/pandas/_libs/join.pyx
+++ b/pandas/_libs/join.pyx
@@ -265,6 +265,9 @@ ctypedef fused join_t:
int16_t
int32_t
int64_t
+ uint8_t
+ uint16_t
+ uint32_t
uint64_t
diff --git a/pandas/_t... | - [x] closes #16404
- [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 presents a unified index type called `NumericIndex` for numerical indexing, suppor... | https://api.github.com/repos/pandas-dev/pandas/pulls/41153 | 2021-04-25T20:48:37Z | 2021-08-05T22:01:59Z | 2021-08-05T22:01:58Z | 2021-08-07T18:42:44Z |
TYP: Overload series/ffill and bfill | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index c77a3717c4c03..1e8e161f02302 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -6469,13 +6469,53 @@ def fillna(
else:
return result.__finalize__(self, method="fillna")
+ @overload
+ def ffill(
+ sel... | - Closes part of MarcoGorelli/pyladieslondon-sprints#29
- Adds `typing.overload` to: `ffill` and ``bfill` from https://github.com/pandas-dev/pandas/blob/master/pandas/core/generic.py
## Setup and Output for `ffill`
```python
# t_ffill.py
import pandas as pd
inplace: bool
reveal_type(pd.DataFrame([1, None... | https://api.github.com/repos/pandas-dev/pandas/pulls/41152 | 2021-04-25T16:30:23Z | 2021-04-26T17:28:44Z | 2021-04-26T17:28:43Z | 2021-04-26T17:28:44Z |
REF: dont call libreduction incorrectly | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index 9d6d2d698dfe5..eac2cdb9dcd0f 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -275,7 +275,7 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
try:
... | Nothing user-facing, just doing slightly less try/except | https://api.github.com/repos/pandas-dev/pandas/pulls/41148 | 2021-04-25T01:10:00Z | 2021-04-26T13:09:19Z | 2021-04-26T13:09:19Z | 2021-04-26T14:28:29Z |
BUG: retain ordered Categorical dtype in SeriesGroupBy aggregations | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 6bbaa934eaa12..92e7c574c87be 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -851,6 +851,7 @@ Groupby/resample/rolling
- Bug in :meth:`.GroupBy.cummin` and :meth:`.GroupBy.cummax` computing wrong resu... | - [ ] 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
- [x] whatsnew entry
ATM we correctly wrap them for DataFrameGroupBy but not for SeriesGroupBy. Doing this corr... | https://api.github.com/repos/pandas-dev/pandas/pulls/41147 | 2021-04-24T23:24:10Z | 2021-04-30T16:34:29Z | 2021-04-30T16:34:29Z | 2021-04-30T18:16:22Z |
BUG: raise ValueError when sep and delimiter are defined in read_csv | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index d357e4a633347..aeb80ed8e2ca4 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -922,6 +922,7 @@ I/O
- Bug in :func:`read_orc` always raising ``AttributeError`` (:issue:`40918`)
- Bug in :func:`read_csv... | - [x] closes #39823
- [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/41146 | 2021-04-24T21:58:22Z | 2021-05-26T02:18:16Z | 2021-05-26T02:18:15Z | 2021-05-27T10:26:53Z |
BUG: Fix series clipping NA issue | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 74710ca48308c..0c1c835e2b70c 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -696,6 +696,7 @@ Numeric
- Bug in :meth:`DataFrame.transform` would raise ``SpecificationError`` when passed a dictionary a... | Series clipping method could not handle series with NA values.
Issue was fixed by first comparing values and only after then converted
to numpy array. Now the test code provided with the issue ticket provides an expected result.
- [x] closes #40581
- [x] tests added / passed
- I did run test_fast.sh and 3 test ... | https://api.github.com/repos/pandas-dev/pandas/pulls/41141 | 2021-04-24T16:07:31Z | 2021-04-30T20:49:51Z | 2021-04-30T20:49:50Z | 2021-05-12T01:46:03Z |
CI: Mark slow tests as slow to speed up ci | diff --git a/pandas/tests/frame/test_constructors.py b/pandas/tests/frame/test_constructors.py
index c565567754da0..26a97416f3d3a 100644
--- a/pandas/tests/frame/test_constructors.py
+++ b/pandas/tests/frame/test_constructors.py
@@ -1011,6 +1011,7 @@ def test_constructor_maskedrecarray_dtype(self):
alt = DataF... | We have a few tests which are really slow and not marked as such. I went through the list below and marked everything greater than 4 seconds as slow. Should give us between 4 and 5 minutes performance boost
<details>
# 29.68s call pandas/tests/io/sas/test_sas7bdat.py::TestSAS7BDAT::test_iterator_loop
# 12.98s ... | https://api.github.com/repos/pandas-dev/pandas/pulls/41140 | 2021-04-24T15:33:28Z | 2021-04-26T12:53:55Z | 2021-04-26T12:53:55Z | 2021-04-26T21:58:37Z |
BUG: groupby sum, mean, var should always be floats | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 74f9af5bf8447..d6aa13184f685 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -333,6 +333,31 @@ values as measured by ``np.allclose``. Now no such casting occurs.
df.groupby('key').agg(lambda x: ... | - [x] closes #41137
- [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 top of #40790 | https://api.github.com/repos/pandas-dev/pandas/pulls/41139 | 2021-04-24T15:04:21Z | 2021-05-21T13:50:50Z | 2021-05-21T13:50:50Z | 2021-11-09T22:06:59Z |
Deprecate inplace in Categorical.reorder_categories. | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 842b50ce53b21..8458a32f252ce 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -609,7 +609,7 @@ Deprecations
- Deprecated using :func:`merge` or :func:`join` on a different number of levels (:issue:`348... | - [x] xref #37643
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/41133 | 2021-04-24T11:12:42Z | 2021-04-26T13:29:27Z | 2021-04-26T13:29:26Z | 2021-04-27T08:10:36Z |
BUG: pd.factorize should not upconvert unique values unnecessarily | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 0e567972e7823..c40ed43504d89 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -705,6 +705,7 @@ Conversion
- Bug in :class:`DataFrame` failing to raise ``TypeError`` when constructing from a ``frozenset... | The uniques returned from `pd.factorize` should keep their original dtype, where possible.
```python
>>> arr =np.array([1,2], dtype="int8")
>>> pd.factorize(arr)
(array([0, 1], dtype=int64), array([1, 2], dtype=int64)) # master
(array([0, 1], dtype=int64), array([1, 2], dtype=int8)) # this PR
```
| https://api.github.com/repos/pandas-dev/pandas/pulls/41132 | 2021-04-24T09:35:49Z | 2021-04-26T11:42:21Z | 2021-04-26T11:42:20Z | 2021-04-26T12:41:35Z |
REF: mix NDArrayBacked into Categorical, PandasArray | diff --git a/pandas/_libs/arrays.pyi b/pandas/_libs/arrays.pyi
new file mode 100644
index 0000000000000..0ca501c5b712c
--- /dev/null
+++ b/pandas/_libs/arrays.pyi
@@ -0,0 +1,45 @@
+from typing import Sequence
+
+import numpy as np
+
+from pandas._typing import (
+ DtypeObj,
+ Shape,
+)
+
+class NDArrayBacked:
+ ... | - [ ] 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/41131 | 2021-04-24T03:09:10Z | 2021-05-05T12:57:43Z | 2021-05-05T12:57:43Z | 2021-05-05T14:49:03Z |
Deprecated usecols with out of bounds indices in read_csv | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 793818419c910..dde6c5dca0274 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -645,6 +645,7 @@ Deprecations
- The ``inplace`` parameter of :meth:`Categorical.remove_categories`, :meth:`Categorical.add_... | - [x] xref #25623
- [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 currently raises
<details>
Traceback (most recent call last):
File "/home/devel... | https://api.github.com/repos/pandas-dev/pandas/pulls/41130 | 2021-04-23T22:45:54Z | 2021-05-13T23:26:06Z | 2021-05-13T23:26:06Z | 2021-05-14T20:19:02Z |
CLN: remove index keyword from _wrap_aggregated_output | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index 9d6d2d698dfe5..bfcb62015f118 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -336,14 +336,12 @@ def _aggregate_multiple_funcs(self, arg):
# let higher level handle
return resu... | https://api.github.com/repos/pandas-dev/pandas/pulls/41128 | 2021-04-23T22:21:13Z | 2021-04-26T12:52:24Z | 2021-04-26T12:52:24Z | 2021-04-26T14:27:37Z | |
TYP: resample | diff --git a/pandas/core/resample.py b/pandas/core/resample.py
index 469325cf04189..14d065de7f77f 100644
--- a/pandas/core/resample.py
+++ b/pandas/core/resample.py
@@ -4,6 +4,7 @@
from datetime import timedelta
from textwrap import dedent
from typing import (
+ TYPE_CHECKING,
Callable,
no_type_check,
... | - [ ] 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/41126 | 2021-04-23T19:24:01Z | 2021-04-28T10:17:19Z | 2021-04-28T10:17:19Z | 2021-04-28T16:08:59Z |
CLN: rename the render process in Styler | diff --git a/asv_bench/benchmarks/io/style.py b/asv_bench/benchmarks/io/style.py
index 6c0ca6fac6ec3..e4369d67ca67e 100644
--- a/asv_bench/benchmarks/io/style.py
+++ b/asv_bench/benchmarks/io/style.py
@@ -17,19 +17,19 @@ def setup(self, cols, rows):
def time_apply_render(self, cols, rows):
self._style_a... | rename `Styler.render` -> `Styler._render_html` and create alias for backwards compat.
| https://api.github.com/repos/pandas-dev/pandas/pulls/41123 | 2021-04-23T13:24:50Z | 2021-04-26T12:14:12Z | 2021-04-26T12:14:12Z | 2021-04-26T12:35:02Z |
CLN: tests.indexes.test_setops.py | diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py
index 3555d043659cf..62c07f4306a96 100644
--- a/pandas/tests/indexes/test_setops.py
+++ b/pandas/tests/indexes/test_setops.py
@@ -17,7 +17,6 @@
Index,
Int64Index,
MultiIndex,
- RangeIndex,
Series,
Timedelt... | I'm experimenting with subclassing NumericIndex and using the test suite to check if everything passes ok (by adding the new subclass to `indices_dict` in `conftest.py` and making a `makeXIndex` func in `_testing.py.
`COMPATIBLE_INCONSISTENT_PAIRS ` in `test_setops.py` is very tied to specific index classes, so is d... | https://api.github.com/repos/pandas-dev/pandas/pulls/41121 | 2021-04-23T12:24:45Z | 2021-04-26T14:52:02Z | 2021-04-26T14:52:02Z | 2021-04-26T15:12:04Z |
Backport PR #41115 on branch 1.2.x (CI: pin numpy in the actions-37 env (pyarrow incompatibility)) | diff --git a/ci/deps/azure-37.yaml b/ci/deps/azure-37.yaml
index 4fe3de161960c..1f9e2db71baf5 100644
--- a/ci/deps/azure-37.yaml
+++ b/ci/deps/azure-37.yaml
@@ -15,7 +15,7 @@ dependencies:
# pandas dependencies
- botocore>=1.11
- fsspec>=0.7.4
- - numpy
+ - numpy=1.19
- python-dateutil
- nomkl
- pya... | Backport PR #41115: CI: pin numpy in the actions-37 env (pyarrow incompatibility) | https://api.github.com/repos/pandas-dev/pandas/pulls/41120 | 2021-04-23T10:56:17Z | 2021-04-23T12:47:48Z | 2021-04-23T12:47:48Z | 2021-04-23T12:47:48Z |
Deprecate inplace in Categorical.add_categories. | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 34269185bccd6..1f59bf5148c1d 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -609,7 +609,7 @@ Deprecations
- Deprecated using :func:`merge` or :func:`join` on a different number of levels (:issue:`348... | - [x] xref #37643
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry | https://api.github.com/repos/pandas-dev/pandas/pulls/41118 | 2021-04-23T09:36:07Z | 2021-04-23T14:50:21Z | 2021-04-23T14:50:21Z | 2021-04-23T14:50:25Z |
CI: pin numpy in the actions-37 env (pyarrow incompatibility) | diff --git a/ci/deps/actions-37.yaml b/ci/deps/actions-37.yaml
index 61f431256dd4a..f29830e9b3e79 100644
--- a/ci/deps/actions-37.yaml
+++ b/ci/deps/actions-37.yaml
@@ -15,7 +15,7 @@ dependencies:
# pandas dependencies
- botocore>=1.11
- fsspec>=0.7.4
- - numpy
+ - numpy=1.19
- python-dateutil
- nomkl
... | This build is currently failing because it started to install numpy 1.20.1 yesterday, which gives an incompatibility with pyarrow. | https://api.github.com/repos/pandas-dev/pandas/pulls/41115 | 2021-04-23T06:55:18Z | 2021-04-23T10:36:52Z | 2021-04-23T10:36:52Z | 2021-04-23T10:54:59Z |
REF: move dispatch methods to WrappedCythonOp | diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py
index d0fb100fdbd9f..8f8c2ba2981c8 100644
--- a/pandas/core/groupby/ops.py
+++ b/pandas/core/groupby/ops.py
@@ -299,6 +299,270 @@ def get_result_dtype(self, dtype: DtypeObj) -> DtypeObj:
def uses_mask(self) -> bool:
return self.how in se... | This gets us most of the way towards having everything in the correct class.
The sticking point that makes this not-a-slam-dunk is that a [check](https://github.com/pandas-dev/pandas/compare/master...jbrockmendel:ref-gbop-wrapped?expand=1#diff-17420aa54e4b74826eaaeedc6ef6b320c16691aa74c09420e6098854284b4874L833-L835... | https://api.github.com/repos/pandas-dev/pandas/pulls/41114 | 2021-04-23T04:13:08Z | 2021-04-26T18:13:33Z | 2021-04-26T18:13:33Z | 2021-04-26T18:16:07Z |
Ci: start testing py310-dev | diff --git a/.github/workflows/python-dev.yml b/.github/workflows/python-dev.yml
new file mode 100644
index 0000000000000..2643dc5ec656e
--- /dev/null
+++ b/.github/workflows/python-dev.yml
@@ -0,0 +1,70 @@
+name: Python Dev
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
... | This might not work now. Let's see.
| https://api.github.com/repos/pandas-dev/pandas/pulls/41113 | 2021-04-23T03:20:51Z | 2021-04-28T15:21:42Z | 2021-04-28T15:21:42Z | 2022-11-18T02:21:53Z |
BUG: DataFrameGroupBy agg with multi-column object block | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 7189c6e68d53d..bc34a337b85fc 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -850,6 +850,7 @@ Groupby/resample/rolling
- Bug in :meth:`.GroupBy.cummin` and :meth:`.GroupBy.cummax` computing wrong resu... | This is analogous to what we did recently-ish with DataFrame._reduce. When we see an object block, split it and operate column-wise. Side-bonus: this makes the BM behavior match the AM behavior. | https://api.github.com/repos/pandas-dev/pandas/pulls/41111 | 2021-04-23T01:35:43Z | 2021-04-29T23:35:53Z | 2021-04-29T23:35:53Z | 2021-04-30T03:02:05Z |
BUG: Check for null values when infering excel in read_clipboard | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index d357e4a633347..9ebb8f4337507 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -925,7 +925,7 @@ I/O
- Bug in :func:`read_csv` and :func:`read_table` misinterpreting arguments when ``sys.setprofile`` had... | GH41108
Stripping whitespace on read_clipboard causes data copied from
excel to lose the tab separator between the first column and
the nexts, shifting the data into the wrong column
This just removes the .lstrip() except for the first line
containing headers, to avoid breaking header-less index in csv
files
... | https://api.github.com/repos/pandas-dev/pandas/pulls/41109 | 2021-04-22T23:26:21Z | 2021-05-26T01:52:46Z | 2021-05-26T01:52:45Z | 2021-05-26T01:52:51Z |
BUG: rolling mean and sum not numerical stable for all nan window | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 0e567972e7823..e168c2191d47b 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -846,6 +846,8 @@ Groupby/resample/rolling
- Bug in :meth:`GroupBy.cummin` and :meth:`GroupBy.cummax` incorrectly rounding i... | - [x] closes #41053
- [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
The problem is not numerical stable, so we are dividing -3e-18 / 0, which returns -inf run... | https://api.github.com/repos/pandas-dev/pandas/pulls/41106 | 2021-04-22T22:34:17Z | 2021-04-26T12:57:27Z | 2021-04-26T12:57:26Z | 2021-04-26T21:58:58Z |
BUG: read_csv/table raising when sys.setprofile used | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 69af8b500f790..30212b1e394a3 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -831,6 +831,7 @@ I/O
- Bug in :func:`read_excel` raising ``AttributeError`` with ``MultiIndex`` header followed by two empt... | - [x] closes #41069
- [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
According to https://docs.python.org/3/library/functions.html#locals, `locals()` should no... | https://api.github.com/repos/pandas-dev/pandas/pulls/41105 | 2021-04-22T21:33:09Z | 2021-05-06T01:37:07Z | 2021-05-06T01:37:07Z | 2022-10-15T23:01:15Z |
CLN: avoid catching AttributeErorr in DataFrameGroupBy.aggregate | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index 4a721ae0d4bf6..8c35d91c52a2f 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -1035,24 +1035,28 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)
else:
... | - [ ] 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/41103 | 2021-04-22T19:16:46Z | 2021-04-26T14:46:10Z | 2021-04-26T14:46:10Z | 2021-04-26T14:48:43Z |
BUG: any/all not returning booleans for object type | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 69af8b500f790..b51e9e9d6333e 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -726,6 +726,7 @@ Numeric
- Bug in :meth:`DataFrame.transform` would raise ``SpecificationError`` when passed a dictionary a... | - [x] closes #12863, closes #27709, closes #35450
- [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
Also allows removing some of the any/all specific boolean co... | https://api.github.com/repos/pandas-dev/pandas/pulls/41102 | 2021-04-22T16:32:40Z | 2021-05-06T01:35:18Z | 2021-05-06T01:35:18Z | 2021-05-06T04:33:06Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.