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 |
|---|---|---|---|---|---|---|---|
DEPR: Series/Index .values special cases | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index d9d1ce797dd62..2caf1023aed15 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -296,6 +296,7 @@ Deprecations
- :meth:`Rolling.count` with ``min_periods=None`` will default to the size of the window in a... | - [x] closes #36957
- [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/37163 | 2020-10-16T17:56:38Z | 2020-10-19T16:50:12Z | null | 2020-10-19T16:50:19Z |
TST: share logical tests Series/DataFrame | diff --git a/pandas/tests/frame/test_operators.py b/pandas/tests/frame/test_operators.py
index 8cf66e2737249..28c1e2a24bc4d 100644
--- a/pandas/tests/frame/test_operators.py
+++ b/pandas/tests/frame/test_operators.py
@@ -244,39 +244,3 @@ def test_logical_with_nas(self):
result = d["a"].fillna(False, downcast=F... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37162 | 2020-10-16T16:13:11Z | 2020-10-16T17:17:45Z | 2020-10-16T17:17:45Z | 2020-10-16T17:58:08Z |
BUG: Series.loc[[]] with non-unique MultiIndex #13691 | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 9fc094330fb36..d68d3f9740131 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -400,6 +400,7 @@ Indexing
- Bug in :meth:`DataFrame.sort_index` where parameter ascending passed as a list on a single leve... | - [x] closes #13691
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
Broken off from #37150 | https://api.github.com/repos/pandas-dev/pandas/pulls/37161 | 2020-10-16T15:31:10Z | 2020-10-16T19:17:12Z | 2020-10-16T19:17:11Z | 2020-10-16T20:35:36Z |
API: Index.__cmp__(Series) return NotImplemented | diff --git a/pandas/core/indexes/extension.py b/pandas/core/indexes/extension.py
index c9367b7e2ee1d..fb6df8d7a5a5c 100644
--- a/pandas/core/indexes/extension.py
+++ b/pandas/core/indexes/extension.py
@@ -10,7 +10,7 @@
from pandas.util._decorators import cache_readonly, doc
from pandas.core.dtypes.common import is_... | - [x] closes #36759
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Gets rid of an unnecessary special case.
Could do this as a deprecation first.
| https://api.github.com/repos/pandas-dev/pandas/pulls/37160 | 2020-10-16T15:27:06Z | 2020-11-11T19:05:30Z | null | 2020-11-11T19:06:09Z |
BUG: Fix parsing of ISO8601 durations | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 9fc094330fb36..e23871a925570 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -348,8 +348,7 @@ Datetimelike
Timedelta
^^^^^^^^^
- Bug in :class:`TimedeltaIndex`, :class:`Series`, and :class:`DataFram... | This PR fixes the following behavior:
- Adds "W" as a valid weeks designator
- Fixes parsing of durations with empty periods (e.g. "PT10M")
- Fixes partial parsing of durations (e.g. "P1DT1H")
Fixes #29773.
Fixes #36204.
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] pass... | https://api.github.com/repos/pandas-dev/pandas/pulls/37159 | 2020-10-16T11:29:05Z | 2020-10-17T00:07:08Z | 2020-10-17T00:07:07Z | 2020-10-17T06:34:22Z |
CLN/REF: Refactor min_periods calculation in rolling | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 9fc094330fb36..dac75349ccff5 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -462,6 +462,7 @@ Groupby/resample/rolling
- Bug in :meth:`RollingGroupby.count` where a ``ValueError`` was raised when spec... | - [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/37156 | 2020-10-16T07:30:53Z | 2020-10-16T19:09:58Z | 2020-10-16T19:09:58Z | 2020-10-16T19:20:30Z |
REF: avoid access to _mgr.blocks -> _mgr._is_single_block | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index f532060f68fc6..784e8877ef128 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -5474,7 +5474,7 @@ def _consolidate(self):
@property
def _is_mixed_type(self) -> bool_t:
- if len(self._mgr.blocks) == 1:
+ if sel... | @jbrockmendel a small follow-up on https://github.com/pandas-dev/pandas/pull/36873. It keeps the same spirit of that PR (I think), but just replacing the access of `len(self._mgr.blocks)` with an existing attribute on the manager (could also remove the leading underscore on the attribute).
(this makes it easier to ov... | https://api.github.com/repos/pandas-dev/pandas/pulls/37155 | 2020-10-16T07:09:09Z | 2020-10-16T17:27:33Z | 2020-10-16T17:27:32Z | 2020-10-16T17:27:38Z |
TST: RollingGroupby(..., center=True, on=...) | diff --git a/pandas/tests/window/test_grouper.py b/pandas/tests/window/test_grouper.py
index 27dd6a1591317..5b25577602216 100644
--- a/pandas/tests/window/test_grouper.py
+++ b/pandas/tests/window/test_grouper.py
@@ -297,6 +297,41 @@ def test_groupby_rolling_center_center(self):
)
tm.assert_frame_equa... | - [x] closes #37141
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Didn't look like we had a test case that exactly covered this. | https://api.github.com/repos/pandas-dev/pandas/pulls/37154 | 2020-10-16T04:10:02Z | 2020-10-16T14:14:08Z | 2020-10-16T14:14:08Z | 2020-10-16T16:16:14Z |
BUG: RecursionError when selecting single column from IntervalIndex #26490 | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 875836bafd6ae..5b2ab4c4572e1 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -400,6 +400,7 @@ Indexing
- Bug in :meth:`DataFrame.sort_index` where parameter ascending passed as a list on a single leve... | - [x] closes #26490
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
#37150 is failing, this is the first of two orthogonal bugfixes in that PR | https://api.github.com/repos/pandas-dev/pandas/pulls/37152 | 2020-10-16T01:36:41Z | 2020-10-17T01:53:49Z | 2020-10-17T01:53:49Z | 2020-10-17T01:54:05Z |
BUG: indexing bugs #26490, #13691 | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 9fc094330fb36..6bd3c5345d06a 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -400,6 +400,8 @@ Indexing
- Bug in :meth:`DataFrame.sort_index` where parameter ascending passed as a list on a single leve... | - [x] closes #26490
- [x] closes #13691
- [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/37150 | 2020-10-15T23:48:49Z | 2020-10-16T15:31:33Z | null | 2020-10-16T15:31:47Z |
BUG: GroupBy().fillna() performance regression | diff --git a/asv_bench/benchmarks/groupby.py b/asv_bench/benchmarks/groupby.py
index bda3ab71d1a00..22f002e6cb79a 100644
--- a/asv_bench/benchmarks/groupby.py
+++ b/asv_bench/benchmarks/groupby.py
@@ -358,6 +358,26 @@ def time_category_size(self):
self.draws.groupby(self.cats).size()
+class FillNA:
+ de... | - [x] closes #36757
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
A performance regression was introduced with #30679 in handling grouping on a duplicate axis. The regression can be avoided by skipping the call to... | https://api.github.com/repos/pandas-dev/pandas/pulls/37149 | 2020-10-15T22:52:55Z | 2020-10-18T14:56:32Z | 2020-10-18T14:56:32Z | 2020-10-19T09:50:03Z |
BUG: DataFrame[td64].sum(skipna=False) | diff --git a/pandas/core/arrays/timedeltas.py b/pandas/core/arrays/timedeltas.py
index 82cd54182a33d..64e5f78d961d1 100644
--- a/pandas/core/arrays/timedeltas.py
+++ b/pandas/core/arrays/timedeltas.py
@@ -381,15 +381,15 @@ def sum(
nv.validate_sum(
(), dict(dtype=dtype, out=out, keepdims=keepdims,... | - [x] closes #17235
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
The same underlying problem affects mean, so this fixes that too.
| https://api.github.com/repos/pandas-dev/pandas/pulls/37148 | 2020-10-15T20:53:27Z | 2020-10-24T02:47:51Z | 2020-10-24T02:47:50Z | 2020-10-24T03:08:28Z |
CLN: sync min versions | diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst
index 70d145c54e919..cd61f17220f22 100644
--- a/doc/source/getting_started/install.rst
+++ b/doc/source/getting_started/install.rst
@@ -262,7 +262,7 @@ BeautifulSoup4 4.6.0 HTML parser for read_html (see... | The minimum version of pytables and pytest was not synchronized. | https://api.github.com/repos/pandas-dev/pandas/pulls/37147 | 2020-10-15T20:49:08Z | 2020-10-16T01:18:30Z | 2020-10-16T01:18:30Z | 2020-10-21T00:29:38Z |
DOC: capitalize Python as proper noun | diff --git a/pandas/core/base.py b/pandas/core/base.py
index 6af537dcd149a..67621cf585793 100644
--- a/pandas/core/base.py
+++ b/pandas/core/base.py
@@ -366,7 +366,7 @@ def ndim(self) -> int:
def item(self):
"""
- Return the first element of the underlying data as a python scalar.
+ Return... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37146 | 2020-10-15T20:48:13Z | 2020-10-16T01:21:53Z | 2020-10-16T01:21:53Z | 2020-10-16T01:21:57Z |
BUG: Fix bug in quantile() for resample and groupby with Timedelta | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index b43ed2963577d..fb6a238218e9f 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -515,6 +515,7 @@ Groupby/resample/rolling
- Bug in :meth:`DataFrameGroupBy.rolling` returned wrong values with timeaware wi... | - [x] closes #29485
- [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/37145 | 2020-10-15T20:38:45Z | 2020-10-31T18:57:02Z | 2020-10-31T18:57:02Z | 2020-10-31T21:26:00Z |
BLD: update build requirement for py39 #37135 | diff --git a/pyproject.toml b/pyproject.toml
index 8161e8ad752da..2b78147e9294d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,9 +6,10 @@ requires = [
"wheel",
"Cython>=0.29.21,<3", # Note: sync with setup.py
"numpy==1.16.5; python_version=='3.7' and platform_system!='AIX'",
- "numpy==1.17.3;... | - [x] closes #37135
| https://api.github.com/repos/pandas-dev/pandas/pulls/37144 | 2020-10-15T18:33:10Z | 2020-10-16T19:25:30Z | 2020-10-16T19:25:29Z | 2022-11-18T02:21:13Z |
DOC: Remove redundant table in Series docs | diff --git a/doc/source/reference/series.rst b/doc/source/reference/series.rst
index f1069e46b56cc..b4a72c030f7cb 100644
--- a/doc/source/reference/series.rst
+++ b/doc/source/reference/series.rst
@@ -22,10 +22,6 @@ Attributes
:toctree: api/
Series.index
-
-.. autosummary::
- :toctree: api/
-
Series.arr... | The attribute `Series.index` was separated in another table, which makes
the rendering of the documentation slightly inconsistent. This commit
consolidates the tables together to make the documentation consistent
and aligned.
**Live site** (https://pandas.pydata.org/docs/reference/series.html):
:
for k1, k2 in zip(key, value.columns):
self[k1] = value[k2]
... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Working on refactoring the indexing setitem code so that we go down the same path regardless of consolidation status. This splits off a small piece ... | https://api.github.com/repos/pandas-dev/pandas/pulls/37142 | 2020-10-15T17:50:27Z | 2020-10-16T01:05:18Z | 2020-10-16T01:05:18Z | 2020-10-16T01:09:22Z |
BUG: algos.diff with datetimelike and NaT | diff --git a/pandas/_libs/algos.pyx b/pandas/_libs/algos.pyx
index c4723a5f064c7..da5ae97bb067b 100644
--- a/pandas/_libs/algos.pyx
+++ b/pandas/_libs/algos.pyx
@@ -1195,6 +1195,7 @@ ctypedef fused diff_t:
ctypedef fused out_t:
float32_t
float64_t
+ int64_t
@cython.boundscheck(False)
@@ -1204,11 +120... | - [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37140 | 2020-10-15T15:51:55Z | 2020-10-17T13:46:11Z | 2020-10-17T13:46:11Z | 2020-10-17T15:10:29Z |
Remove no-longer-necessary CI checks | diff --git a/ci/code_checks.sh b/ci/code_checks.sh
index 784d2c9a411ab..c8718128e4cc8 100755
--- a/ci/code_checks.sh
+++ b/ci/code_checks.sh
@@ -180,14 +180,6 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -r -E --include '*.py' "[[:space:]] pytest.raises" pandas/tests/
RET=$(($RET + $?)) ; e... | xrange is no longer valid in Python3, so this check is unnecessary.
`# -\*- coding: utf-8 -\*-"`, `class\s\S*\((object)?\):`, and `"super\(\w*, (self|cls)\)` are fixed by pyupgrade
closes #37133
| https://api.github.com/repos/pandas-dev/pandas/pulls/37138 | 2020-10-15T15:01:11Z | 2020-10-16T01:08:05Z | 2020-10-16T01:08:05Z | 2020-10-16T07:27:05Z |
TYP: use overload to refine return type of reset_index | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 539275c7ff617..3607fbea594c6 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -34,6 +34,7 @@
Type,
Union,
cast,
+ overload,
)
import warnings
@@ -155,6 +156,8 @@
import pandas.plotting
if TYPE_CHECKING:
+ from typ... | maybe alternative to #33519
with `from __future__ import annotations` on py3.7 the types in the function signature are not evaluated at run-time, so this shouldn't fail 🤞 | https://api.github.com/repos/pandas-dev/pandas/pulls/37137 | 2020-10-15T13:55:31Z | 2020-10-23T21:21:37Z | 2020-10-23T21:21:37Z | 2020-10-24T21:02:24Z |
CI move check incorrect sphinx directives to pre-commit | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1c6d36133f067..e6b021133dd90 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -53,6 +53,15 @@ repos:
types: [rst]
args: [--filename=*.rst]
additional_dependencies: [flake8-rst==0.7.0, flake8==3.7.9]
+ ... | Currently, the check (which uses `grep` with the return codes inverted) doesn't catch
```python
.. warning:
```
, while using `pygrep` from `pre-commit` (which is a Python implementation of `grep` with inverted return codes) does. I think this is because grep doesn't count the newline as a character
Advant... | https://api.github.com/repos/pandas-dev/pandas/pulls/37136 | 2020-10-15T13:17:33Z | 2020-10-16T01:23:04Z | 2020-10-16T01:23:03Z | 2020-10-16T07:26:27Z |
BUG: raise when doing arithmetic on DataFrame and list of iterables | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 339cda4db48fb..ecd6ebfabdb6e 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -371,6 +371,7 @@ Numeric
- Bug in :meth:`DataFrame.diff` with ``datetime64`` dtypes including ``NaT`` values failing to fil... | - [X] closes #36702
- [X] tests 1 added / 1 passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry
## Problem
We currently allow doing arithmetic on a DataFrame, and, for example, a list of Series. The latter gets broadcast with `align_meth... | https://api.github.com/repos/pandas-dev/pandas/pulls/37132 | 2020-10-15T08:15:43Z | 2020-10-16T19:24:41Z | 2020-10-16T19:24:40Z | 2021-07-11T17:45:12Z |
TST: test for expanding window with min_periods GH25857 | diff --git a/pandas/tests/window/test_expanding.py b/pandas/tests/window/test_expanding.py
index b06a506281047..3dc1974685226 100644
--- a/pandas/tests/window/test_expanding.py
+++ b/pandas/tests/window/test_expanding.py
@@ -137,6 +137,14 @@ def test_expanding_count_default_min_periods_with_null_values(constructor):
... | - [x] closes #25857
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Hi @mroeschke, here's the new test - please let me know if it needs any changes. | https://api.github.com/repos/pandas-dev/pandas/pulls/37131 | 2020-10-15T07:43:15Z | 2020-10-16T01:16:23Z | 2020-10-16T01:16:23Z | 2020-10-16T09:08:24Z |
PERF: compare RangeIndex to equal RangeIndex | diff --git a/pandas/core/indexes/range.py b/pandas/core/indexes/range.py
index 14098ddadb8e2..74ec892d5f8a0 100644
--- a/pandas/core/indexes/range.py
+++ b/pandas/core/indexes/range.py
@@ -811,6 +811,15 @@ def any(self, *args, **kwargs) -> bool:
# -----------------------------------------------------------------... | Fastpath for RangeIndexes with equal `_range` attribute.
Notice this works even if the RangeIndexes are not identical.
Example:
```python
>>> n = 100_000
>>> rng1 = pd.RangeIndex(n)
>>> rng2 = pd.RangeIndex(n)
>>> %timeit rng1 == rng2
374 µs ± 15.1 µs per loop # master
10.4 µs ± 157 ns per loop # this... | https://api.github.com/repos/pandas-dev/pandas/pulls/37130 | 2020-10-15T07:14:21Z | 2020-10-15T12:26:00Z | 2020-10-15T12:26:00Z | 2021-06-13T10:11:15Z |
ENH: DataFrame.to_parquet() returns bytes if path_or_buf not provided | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index e4d97168692b3..28c86015fb7b6 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -221,6 +221,7 @@ Other enhancements
- :meth:`Rolling.var()` and :meth:`Rolling.std()` use Kahan summation and Welfords Meth... | - [x] closes #37105
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
Not sure if this is an API breaking change. Prior to this patch `path` was a required positional argument but it becomes optional here. It is now c... | https://api.github.com/repos/pandas-dev/pandas/pulls/37129 | 2020-10-15T05:35:54Z | 2020-10-21T19:14:04Z | 2020-10-21T19:14:04Z | 2020-10-21T19:14:15Z |
TYP: add Shape alias to pandas._typing | diff --git a/pandas/_typing.py b/pandas/_typing.py
index 3e89cf24632e2..55a1c17b0aa53 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -15,6 +15,7 @@
Mapping,
Optional,
Sequence,
+ Tuple,
Type,
TypeVar,
Union,
@@ -93,6 +94,7 @@
Label = Optional[Hashable]
IndexLabel = Union[La... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
xref https://github.com/pandas-dev/pandas/pull/37024#discussion_r503488032
cc @simonjayhawkins | https://api.github.com/repos/pandas-dev/pandas/pulls/37128 | 2020-10-15T04:15:08Z | 2020-11-04T16:53:07Z | 2020-11-04T16:53:07Z | 2020-11-04T16:53:11Z |
[REDO] CLN: core/dtypes/cast.py::maybe_downcast_to_dtype | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index e550309461de4..bcd878bb5a084 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -2,6 +2,7 @@
Routines for casting.
"""
+from contextlib import suppress
from datetime import date, datetime, timedelta
from typing imp... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
xref https://github.com/pandas-dev/pandas/pull/37050#issuecomment-708487786
The combination of #37050 and #37024 generated a `mypy` complaint. Thi... | https://api.github.com/repos/pandas-dev/pandas/pulls/37126 | 2020-10-15T03:26:12Z | 2020-10-17T13:47:03Z | 2020-10-17T13:47:03Z | 2020-10-17T13:47:14Z |
Add test_masking_duplicate_columns | diff --git a/pandas/tests/frame/test_nonunique_indexes.py b/pandas/tests/frame/test_nonunique_indexes.py
index a8b76f4d85f49..68d0e7cffe7a1 100644
--- a/pandas/tests/frame/test_nonunique_indexes.py
+++ b/pandas/tests/frame/test_nonunique_indexes.py
@@ -513,3 +513,12 @@ def test_set_value_by_index(self):
df.i... | - [x] closes #31954
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
I don't know what an whatsnew entry is...
This PR adds a test in order to solve an issue | https://api.github.com/repos/pandas-dev/pandas/pulls/37125 | 2020-10-14T23:34:51Z | 2020-12-08T05:47:57Z | null | 2020-12-08T05:47:57Z |
REF: IntervalArray comparisons | diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py
index 161cf3bf3a677..f8ece2a9fe7d4 100644
--- a/pandas/core/arrays/interval.py
+++ b/pandas/core/arrays/interval.py
@@ -1,3 +1,4 @@
+import operator
from operator import le, lt
import textwrap
from typing import TYPE_CHECKING, Optional, Tup... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37124 | 2020-10-14T23:02:47Z | 2020-11-03T09:57:29Z | 2020-11-03T09:57:28Z | 2020-11-03T15:11:29Z |
Backport PR #35688 on branch 1.1.x: Fix GH-29442 DataFrame.groupby doesn't preserve _metadata | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index aa2c77da4ee6f..6892fb62028c9 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -27,7 +27,7 @@ Fixed regressions
Bug fixes
~~~~~~~~~
--
+- Bug causing ``groupby(...).sum()`` and similar to not preserv... | Backport PR #35688
| https://api.github.com/repos/pandas-dev/pandas/pulls/37122 | 2020-10-14T19:44:15Z | 2020-10-15T12:02:54Z | 2020-10-15T12:02:54Z | 2020-10-15T12:02:59Z |
ERR: Removing quotation marks in error message | diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py
index b7554081fb521..538c15b707761 100644
--- a/pandas/io/parsers.py
+++ b/pandas/io/parsers.py
@@ -3826,6 +3826,6 @@ def _validate_skipfooter(kwds: Dict[str, Any]) -> None:
"""
if kwds.get("skipfooter"):
if kwds.get("iterator") or kwds.get("ch... | Follow-up to https://github.com/pandas-dev/pandas/pull/36852
When reviewing, I got confused and thought `iteration` was somehow an argument to `read_csv` (like `nrows`). Since it is now, the quotation marks don't make as much sense to have.
Doing this as a follow-up since the original PR was a pure refactoring. | https://api.github.com/repos/pandas-dev/pandas/pulls/37120 | 2020-10-14T18:57:43Z | 2020-10-15T00:27:51Z | 2020-10-15T00:27:51Z | 2020-10-15T00:48:34Z |
PERF: regression in DataFrame reduction ops performance #37081 | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 539275c7ff617..8779ad6ef1c0d 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -8652,11 +8652,10 @@ def _reduce(
assert filter_type is None or filter_type == "bool", filter_type
out_dtype = "bool" if filter_type == "bool" els... | - [x] closes #37081
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Made the change proposed by @jorisvandenbossche in https://github.com/pandas-dev/pandas/pull/35881#discussion_r504035006
Did a very quick comparison :
With `self... | https://api.github.com/repos/pandas-dev/pandas/pulls/37118 | 2020-10-14T18:22:06Z | 2020-10-17T13:49:55Z | 2020-10-17T13:49:55Z | 2020-10-17T13:50:01Z |
CI: check for numpy.random-related imports | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d9e48ab9b6189..1065ccff32632 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -66,9 +66,17 @@ repos:
from\ pandas\.core\ import\ common|
# Check for imports from collections.abc instead of `from collect... | ~~- [x] closes #37053 (keep this issue open until both #37492 and #37117 are completed)~~
- [x] tests added / passed ~~(once #37492is merged)~~
# update 2020-10-31
now use a pre-commit check instead of the previous code_check
***
~~code_check.sh will be used to locate where numpy.random-related imports are.~~... | https://api.github.com/repos/pandas-dev/pandas/pulls/37117 | 2020-10-14T17:37:22Z | 2020-10-31T14:50:32Z | 2020-10-31T14:50:32Z | 2020-10-31T15:11:51Z |
Revert "CLN: core/dtypes/cast.py::maybe_downcast_to_dtype" | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index b6b9a2ae2aab8..e550309461de4 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -2,7 +2,6 @@
Routines for casting.
"""
-from contextlib import suppress
from datetime import date, datetime, timedelta
from typing imp... | Reverts pandas-dev/pandas#37050 | https://api.github.com/repos/pandas-dev/pandas/pulls/37116 | 2020-10-14T15:44:15Z | 2020-10-14T16:41:36Z | 2020-10-14T16:41:36Z | 2020-10-14T16:41:43Z |
TST: add message matches to pytest.raises in test_duplicate_labels.py GH30999 | diff --git a/pandas/tests/generic/test_duplicate_labels.py b/pandas/tests/generic/test_duplicate_labels.py
index 97468e1f10a8b..42745d2a69375 100644
--- a/pandas/tests/generic/test_duplicate_labels.py
+++ b/pandas/tests/generic/test_duplicate_labels.py
@@ -275,7 +275,8 @@ def test_set_flags_with_duplicates(self, cls, a... | Reference https://github.com/pandas-dev/pandas/issues/30999
- [x] tests added / passed
- [x] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
Hello! This is my first PR here. I followed the steps in the contributing guidelines [here](https://github.com/pandas-dev/panda... | https://api.github.com/repos/pandas-dev/pandas/pulls/37114 | 2020-10-14T12:31:40Z | 2020-10-14T18:06:55Z | 2020-10-14T18:06:55Z | 2020-10-14T18:07:12Z |
CLN: runtime imports | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index a7379376c2f78..2febd36c76b75 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -7,15 +7,17 @@
import numpy as np
-from pandas._libs import lib, tslib, tslibs
+from pandas._libs import lib, tslib
from pandas._libs.... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37112 | 2020-10-14T01:05:36Z | 2020-10-14T12:12:38Z | 2020-10-14T12:12:38Z | 2020-10-14T14:41:30Z |
CLN: ops, unnecessary mixin | diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py
index eb5e5b03fe243..dd9adc59c909b 100644
--- a/pandas/core/arrays/datetimelike.py
+++ b/pandas/core/arrays/datetimelike.py
@@ -75,6 +75,7 @@
from pandas.core.arrays import DatetimeArray, TimedeltaArray
DTScalarOrNaT = Union[Da... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37111 | 2020-10-14T01:02:28Z | 2020-10-14T12:14:07Z | 2020-10-14T12:14:07Z | 2020-10-14T14:43:15Z |
BLD: extract GH Actions check function to avoid duplication in code_checks.sh | diff --git a/ci/code_checks.sh b/ci/code_checks.sh
index 784d2c9a411ab..c5c62060abd62 100755
--- a/ci/code_checks.sh
+++ b/ci/code_checks.sh
@@ -25,6 +25,11 @@ BASE_DIR="$(dirname $0)/.."
RET=0
CHECK=$1
+
+function quote_if_needed {
+ awk '{ print $0 ~ /.*\s+.*/ ? "\""$0"\"" : $0 }'
+}
+
function invgrep {
... | This PR extracts a function `if_gh_actions` in `ci/code_checks.sh` to avoid command/arguments duplication. Originally part of #36386 (cherry-picked from 8611fe68); extracted to make the changes more modular (see the cross-linked comment).
- [N/A] closes #xxxx (xref https://github.com/pandas-dev/pandas/pull/36386#is... | https://api.github.com/repos/pandas-dev/pandas/pulls/37110 | 2020-10-13T23:13:43Z | 2020-11-02T19:41:46Z | null | 2020-11-02T19:42:09Z |
PERF: Faster comparisons of indexes when compared to self | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index 6b71e455782e3..1adf308a273c3 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -5363,6 +5363,24 @@ def _cmp_method(self, other, op):
"""
Wrapper used to dispatch comparison operations.
"""... | Examples:
```python
>>> rng = pd.RangeIndex(100_000)
>>> %timeit rng == rng
429 µs ± 96.9 µs per loop # master
14.1 µs ± 93.8 ns per loop # this PR
>>> idx = rng.astype(int)
>>> %timeit idx == idx
347 µs ± 1.42 µs per loop #master
14.1 µs ± 91.4 ns per loop # this PR
>>> idx = rng.astype(object)
>>> %t... | https://api.github.com/repos/pandas-dev/pandas/pulls/37109 | 2020-10-13T21:59:33Z | 2021-01-01T22:19:19Z | null | 2021-01-01T22:19:25Z |
TYP: fix typing errors for mypy==0.790, bump mypy version | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 946fda5f82279..cb97fdeccd579 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -88,7 +88,7 @@ If installed, we now require:
+-----------------+-----------------+----------+---------+
| pytest (dev) ... | - [x] closes #37104
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| https://api.github.com/repos/pandas-dev/pandas/pulls/37108 | 2020-10-13T20:31:00Z | 2021-01-10T09:38:05Z | 2021-01-10T09:38:04Z | 2021-01-10T15:29:51Z |
BUG: Fixes #36918 boxplots with matplotlib | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index f77a55b95d567..62c90e32fad2d 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -437,6 +437,7 @@ Plotting
- Bug in :meth:`DataFrame.plot` was rotating xticklabels when ``subplots=True``, even if the x-ax... | Fixes #36918
I believe that the @TomAugspurger in #35393 found out that, when `sharex` or `sharey` are enabled, matplotlib counts the number of ticks of an axis in a subplot as the total number of ticks of the shared axis in all subplots. Since matplotlib became stricter with `set_xticks`, the proposed workaround wa... | https://api.github.com/repos/pandas-dev/pandas/pulls/37107 | 2020-10-13T19:42:22Z | 2021-02-11T01:33:28Z | null | 2021-02-11T01:33:29Z |
CLN: remove unnecessary _validate_foo methods | diff --git a/pandas/core/arrays/_mixins.py b/pandas/core/arrays/_mixins.py
index 95a003efbe1d0..948ffdc1f7c01 100644
--- a/pandas/core/arrays/_mixins.py
+++ b/pandas/core/arrays/_mixins.py
@@ -180,13 +180,10 @@ def _validate_shift_value(self, fill_value):
return self._validate_fill_value(fill_value)
def... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
since DatetimeLike and Categorical no longer special-case these, we can inline them. | https://api.github.com/repos/pandas-dev/pandas/pulls/37106 | 2020-10-13T18:37:02Z | 2020-10-14T12:21:59Z | 2020-10-14T12:21:59Z | 2020-10-14T14:42:29Z |
CLN: unify numpy.random-related imports in pandas/tests/plotting | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 46de8d466dd11..b391871b18245 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,12 +37,6 @@ jobs:
ci/code_checks.sh lint
if: always()
- - name: Dependencies consistency
- run: |
- source acti... | # latest update
all files are moved to #37492
***
- [x] closes #37053 ~~(keep this issue open until both #37103 and #37117 are completed)~~
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
A separate PR(CI) will be opened to add relat... | https://api.github.com/repos/pandas-dev/pandas/pulls/37103 | 2020-10-13T17:05:26Z | 2020-10-29T18:31:11Z | null | 2020-10-29T18:49:45Z |
VIS: Accept xlabel and ylabel for scatter and hexbin plots | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index a963442ecda1c..d9d1ce797dd62 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -193,6 +193,7 @@ Other enhancements
- Where possible :meth:`RangeIndex.difference` and :meth:`RangeIndex.symmetric_differen... | - [x] closes #37001
- [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/37102 | 2020-10-13T15:44:23Z | 2020-10-14T17:54:11Z | 2020-10-14T17:54:11Z | 2020-10-15T08:02:43Z |
ENH: .read_pickle(...) from zip containing hidden OS X/macOS metadata files/folders | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index a3b5ba616b258..e8680d7aae042 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -253,6 +253,8 @@ Other enhancements
- Improve error reporting for :meth:`DataFrame.merge()` when invalid merge column defin... | - [x] closes #37098
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
This PR allows for `.zip` files created by OS X and macOS that contain `__MACOSX` and `.DS_STORE` metadata folders to be loaded by `read_pickle/rea... | https://api.github.com/repos/pandas-dev/pandas/pulls/37101 | 2020-10-13T14:53:40Z | 2020-11-23T13:18:38Z | null | 2020-11-23T13:18:38Z |
Update code_checks.sh to check for instances of os.remove | diff --git a/ci/code_checks.sh b/ci/code_checks.sh
index 784d2c9a411ab..5437692d54439 100755
--- a/ci/code_checks.sh
+++ b/ci/code_checks.sh
@@ -268,6 +268,10 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then
invgrep -RI --exclude=\*.{svg,c,cpp,html,js} --exclude-dir=env "\s$" *
RET=$(($RET + $?)) ; ech... | I have included a check for instances of os.remove in the tests folder. This is in line with issue #37095 whereby ensure_clean should be used rather than os.remove.
A few outstanding questions remain:
- Should this be expanded to search for cases of os.remove elsewhere?
- ~~Cases of `os.remove ` still exist i... | https://api.github.com/repos/pandas-dev/pandas/pulls/37097 | 2020-10-13T10:42:01Z | 2020-10-16T01:30:56Z | 2020-10-16T01:30:55Z | 2020-10-16T09:13:58Z |
Gh 36562 typeerror comparison not supported between float and str | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 7111d54d65815..ae6e2de1b819c 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -469,6 +469,7 @@ MultiIndex
- Bug in :meth:`DataFrame.xs` when used with :class:`IndexSlice` raises ``TypeError`` with me... | - [x] closes #36562
- [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/37096 | 2020-10-13T09:51:07Z | 2020-11-04T01:55:12Z | 2020-11-04T01:55:11Z | 2021-08-19T01:54:36Z |
Clean unreachable | diff --git a/pandas/core/computation/parsing.py b/pandas/core/computation/parsing.py
index 86e125b6b909b..ab7c1a9f0cf23 100644
--- a/pandas/core/computation/parsing.py
+++ b/pandas/core/computation/parsing.py
@@ -36,10 +36,7 @@ def create_valid_python_identifier(name: str) -> str:
# toke.tok_name contains a readab... | xref #27396
| https://api.github.com/repos/pandas-dev/pandas/pulls/37092 | 2020-10-13T00:26:49Z | 2020-10-13T21:10:22Z | null | 2022-11-18T02:21:11Z |
REF/TYP: pandas/core/window/*.py | diff --git a/pandas/_libs/window/aggregations.pyx b/pandas/_libs/window/aggregations.pyx
index 131e0154ce8fc..fe97c048d4472 100644
--- a/pandas/_libs/window/aggregations.pyx
+++ b/pandas/_libs/window/aggregations.pyx
@@ -3,7 +3,6 @@
import cython
from cython import Py_ssize_t
-from libc.stdlib cimport free, malloc
... | - [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
* Create clearer separation for methods belonging to `Window` vs `Rolling`
* More typing | https://api.github.com/repos/pandas-dev/pandas/pulls/37091 | 2020-10-12T23:55:29Z | 2020-10-15T16:40:28Z | 2020-10-15T16:40:28Z | 2020-10-15T23:22:48Z |
TST: Series constructor behavior is consistent for mixed float NaN and int dtype data | diff --git a/pandas/tests/series/test_constructors.py b/pandas/tests/series/test_constructors.py
index a950ca78fc742..e20da0b891006 100644
--- a/pandas/tests/series/test_constructors.py
+++ b/pandas/tests/series/test_constructors.py
@@ -688,6 +688,13 @@ def test_constructor_coerce_float_valid(self, float_dtype):
... | - [x] closes #22585
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37090 | 2020-10-12T23:41:06Z | 2020-10-25T18:52:39Z | 2020-10-25T18:52:39Z | 2021-12-30T00:39:40Z |
CLN: in maybe_cast_to_integer_array assert that dtype arg is an integer dtype | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index a7379376c2f78..3f6cfe2d44650 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -1740,6 +1740,8 @@ def maybe_cast_to_integer_array(arr, dtype, copy: bool = False):
...
ValueError: Trying to coerce float val... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry | https://api.github.com/repos/pandas-dev/pandas/pulls/37089 | 2020-10-12T22:59:43Z | 2020-10-14T12:25:51Z | 2020-10-14T12:25:51Z | 2020-10-14T12:25:55Z |
CLN: clean Index._id | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index b3f5fb6f0291a..d180945d85d00 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -9,6 +9,7 @@
FrozenSet,
Hashable,
List,
+ NewType,
Optional,
Sequence,
Tuple,
@@ -139,7 +140,9 @@ def i... | Minor cleanup. | https://api.github.com/repos/pandas-dev/pandas/pulls/37087 | 2020-10-12T22:15:38Z | 2020-10-14T12:26:46Z | 2020-10-14T12:26:46Z | 2020-10-14T13:30:01Z |
CI: remove xfail for numpy-dev on branch 1.1.x only | diff --git a/pandas/tests/indexes/common.py b/pandas/tests/indexes/common.py
index 5f82203d92dc3..1cb539f6010fd 100644
--- a/pandas/tests/indexes/common.py
+++ b/pandas/tests/indexes/common.py
@@ -5,7 +5,6 @@
import pytest
from pandas._libs import iNaT
-from pandas.compat.numpy import _is_numpy_dev
from pandas.err... | partially reverts pandas-dev/pandas#35537, xref https://github.com/pandas-dev/pandas/issues/35481#issuecomment-705144719 | https://api.github.com/repos/pandas-dev/pandas/pulls/37082 | 2020-10-12T15:22:22Z | 2020-10-14T19:24:03Z | 2020-10-14T19:24:03Z | 2020-10-21T12:36:19Z |
Backport PR #37046 on branch 1.1.x: Add whatsnew for #36727 | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index 3ad8d981be2c9..3cd72caa3d257 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -17,6 +17,7 @@ Fixed regressions
- Fixed regression where attempting to mutate a :class:`DateOffset` object would no longer... | Backport PR #37046 on branch 1.1.x | https://api.github.com/repos/pandas-dev/pandas/pulls/37079 | 2020-10-12T14:12:53Z | 2020-10-12T15:06:23Z | 2020-10-12T15:06:23Z | 2020-10-12T15:06:28Z |
Backport PR #36937 on branch 1.1.x: BUG: GH36928 Allow dict_keys to be used as column names by read_csv | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index 3ad8d981be2c9..e2a17052726b0 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -14,6 +14,7 @@ including other versions of pandas.
Fixed regressions
~~~~~~~~~~~~~~~~~
+- Fixed regression in :func:`rea... | Backport PR #36937 on branch 1.1.x | https://api.github.com/repos/pandas-dev/pandas/pulls/37078 | 2020-10-12T14:07:40Z | 2020-10-12T15:09:51Z | 2020-10-12T15:09:51Z | 2020-10-12T15:09:56Z |
Backport PR #37034 on branch 1.1.x (REGR: Fix casting of None to str during astype) | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index 4b93362e5fd3f..aa2c77da4ee6f 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -18,6 +18,7 @@ Fixed regressions
- Fixed regression where attempting to mutate a :class:`DateOffset` object would no longer... | Backport PR #37034: REGR: Fix casting of None to str during astype | https://api.github.com/repos/pandas-dev/pandas/pulls/37076 | 2020-10-12T14:00:58Z | 2020-10-12T16:47:42Z | 2020-10-12T16:47:42Z | 2020-10-12T16:47:42Z |
ENH: Add MultiIndex.dtypes | diff --git a/doc/source/reference/indexing.rst b/doc/source/reference/indexing.rst
index d3f9413dae565..8446b384b8fb8 100644
--- a/doc/source/reference/indexing.rst
+++ b/doc/source/reference/indexing.rst
@@ -290,6 +290,7 @@ MultiIndex properties
MultiIndex.codes
MultiIndex.nlevels
MultiIndex.levshape
+ M... | - [x] closes #37062
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
Adds the .dtypes property to MultiIndex using the suggested implementation | https://api.github.com/repos/pandas-dev/pandas/pulls/37073 | 2020-10-12T09:42:47Z | 2020-12-11T23:04:19Z | 2020-12-11T23:04:19Z | 2020-12-11T23:04:25Z |
BUG: preserve timezone info when writing empty tz-aware series to HDF5 | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 4b2318350b286..80f4ceccfb82c 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -476,6 +476,7 @@ I/O
- Bug in :meth:`DataFrame.to_html`, :meth:`DataFrame.to_string`, and :meth:`DataFrame.to_latex` ignori... | - [x] closes #20594 (coupled with #37069 for empty tz-aware dataframes)
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
xref #20595 (stale PR that looked into this) | https://api.github.com/repos/pandas-dev/pandas/pulls/37072 | 2020-10-12T06:21:28Z | 2020-10-31T15:00:03Z | 2020-10-31T15:00:03Z | 2020-11-01T02:24:22Z |
BUG: Resolve passing datetime strings of the form "1-01-01 00:00:00" | diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py
index 583110cc4ba70..c9cca13e3c54d 100644
--- a/pandas/tests/scalar/timestamp/test_constructors.py
+++ b/pandas/tests/scalar/timestamp/test_constructors.py
@@ -499,6 +499,13 @@ def test_construct_with_di... | - [x] closes #37071
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37070 | 2020-10-12T05:18:25Z | 2020-10-13T04:52:03Z | null | 2020-10-13T04:52:04Z |
BUG: preserve timezone info when writing empty tz-aware frame to HDF5 | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 339cda4db48fb..9fc094330fb36 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -433,6 +433,7 @@ I/O
- Bug in :meth:`to_json` with ``lines=True`` and ``orient='records'`` the last line of the record is n... | - [ ] partially closes #20594
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Will handle series case in follow-on | https://api.github.com/repos/pandas-dev/pandas/pulls/37069 | 2020-10-12T05:03:20Z | 2020-10-15T12:27:50Z | 2020-10-15T12:27:49Z | 2020-10-15T13:27:07Z |
CLN: remove unnecessary Categorical._validate_setitem_key | diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py
index 8dc5e6c0ff2aa..081a363ce03c6 100644
--- a/pandas/core/arrays/categorical.py
+++ b/pandas/core/arrays/categorical.py
@@ -9,7 +9,7 @@
from pandas._config import get_option
-from pandas._libs import NaT, algos as libalgos, hashta... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
and some unrelated cleanup in internals | https://api.github.com/repos/pandas-dev/pandas/pulls/37068 | 2020-10-12T03:45:43Z | 2020-10-12T23:27:50Z | 2020-10-12T23:27:50Z | 2020-10-13T00:43:48Z |
TYP: Misc groupby typing | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 86b6c4a6cf575..3079bb0b79b33 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -5417,7 +5417,7 @@ def __setattr__(self, name: str, value) -> None:
)
object.__setattr__(self, name, value)
- def... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37066 | 2020-10-12T03:08:20Z | 2020-10-12T13:44:21Z | 2020-10-12T13:44:21Z | 2020-12-06T14:04:47Z |
REF: define NDFrame inplace ops non-dynamically | diff --git a/pandas/core/arraylike.py b/pandas/core/arraylike.py
index 553649212aa5f..da366c9abf0a4 100644
--- a/pandas/core/arraylike.py
+++ b/pandas/core/arraylike.py
@@ -6,8 +6,6 @@
"""
import operator
-from pandas.errors import AbstractMethodError
-
from pandas.core.ops import roperator
from pandas.core.ops.c... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37065 | 2020-10-12T02:17:39Z | 2020-10-12T15:19:51Z | 2020-10-12T15:19:51Z | 2020-10-12T15:30:39Z |
PERF: ExpandingGroupby | diff --git a/asv_bench/benchmarks/rolling.py b/asv_bench/benchmarks/rolling.py
index f0dd908f81043..226b225b47591 100644
--- a/asv_bench/benchmarks/rolling.py
+++ b/asv_bench/benchmarks/rolling.py
@@ -76,12 +76,21 @@ class ExpandingMethods:
def setup(self, constructor, dtype, method):
N = 10 ** 5
+ ... | - [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
```
before after ratio
[89cc5bf9] [6af880e7]
<master> <feature/groupby_expanding_indexer>
- 45.5±0.6ms 3.7... | https://api.github.com/repos/pandas-dev/pandas/pulls/37064 | 2020-10-12T00:51:38Z | 2020-10-12T16:57:08Z | 2020-10-12T16:57:08Z | 2020-10-12T17:08:12Z |
TST: Verify functioning of histtype argument (GH23992) | diff --git a/pandas/tests/plotting/common.py b/pandas/tests/plotting/common.py
index c04b70f3c2953..82a62c4588b94 100644
--- a/pandas/tests/plotting/common.py
+++ b/pandas/tests/plotting/common.py
@@ -1,4 +1,5 @@
import os
+from typing import TYPE_CHECKING, Sequence, Union
import warnings
import numpy as np
@@ -12... | - [x] closes #23992
- [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/37063 | 2020-10-11T23:27:19Z | 2020-11-01T06:31:43Z | 2020-11-01T06:31:43Z | 2020-11-01T06:31:43Z |
REF/TYP: use OpsMixin for StringArray | diff --git a/pandas/core/arrays/string_.py b/pandas/core/arrays/string_.py
index 553ba25270943..8231a5fa0509b 100644
--- a/pandas/core/arrays/string_.py
+++ b/pandas/core/arrays/string_.py
@@ -1,4 +1,3 @@
-import operator
from typing import TYPE_CHECKING, Type, Union
import numpy as np
@@ -15,7 +14,6 @@
pandas... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
its already mixed in, this just removes the leftover _create_arithmetic_method usage.
This is the last one outside of tests, for which we still ha... | https://api.github.com/repos/pandas-dev/pandas/pulls/37061 | 2020-10-11T21:58:55Z | 2020-10-12T13:45:07Z | 2020-10-12T13:45:07Z | 2020-10-12T14:26:17Z |
TST/CLN: relocate tests for PyTables roundtrip of timezone-aware Index | diff --git a/pandas/tests/io/pytables/test_store.py b/pandas/tests/io/pytables/test_store.py
index 1e1c9e91faa4b..e9cc1e6d5b1c3 100644
--- a/pandas/tests/io/pytables/test_store.py
+++ b/pandas/tests/io/pytables/test_store.py
@@ -2189,17 +2189,6 @@ def test_calendar_roundtrip_issue(self, setup_path):
result... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37060 | 2020-10-11T20:45:07Z | 2020-10-12T05:45:23Z | 2020-10-12T05:45:23Z | 2020-10-13T02:44:43Z |
TYP: mostly io, plotting | diff --git a/pandas/core/base.py b/pandas/core/base.py
index 10b83116dee58..6af537dcd149a 100644
--- a/pandas/core/base.py
+++ b/pandas/core/base.py
@@ -4,12 +4,22 @@
import builtins
import textwrap
-from typing import Any, Callable, Dict, FrozenSet, Optional, TypeVar, Union
+from typing import (
+ TYPE_CHECKING... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
cc @simonjayhawkins can i get your thoughts on two remaining mypy complaints
```
pandas/io/excel/_base.py:795: error: "Callable[[ExcelWriter], Tu... | https://api.github.com/repos/pandas-dev/pandas/pulls/37059 | 2020-10-11T18:37:56Z | 2020-10-14T12:27:19Z | 2020-10-14T12:27:19Z | 2020-10-14T14:41:51Z |
TYP: core.internals | diff --git a/pandas/core/arrays/base.py b/pandas/core/arrays/base.py
index 94d6428b44043..debfb50caeeaa 100644
--- a/pandas/core/arrays/base.py
+++ b/pandas/core/arrays/base.py
@@ -1081,6 +1081,19 @@ def _formatter(self, boxed: bool = False) -> Callable[[Any], Optional[str]]:
# Reshaping
# -------------------... | - [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
Annotating Block as `Union[np.ndarray, ExtensionArray]`, mypy gives tons of complaints about EA not having `.T`, so this adds that, then updates test... | https://api.github.com/repos/pandas-dev/pandas/pulls/37058 | 2020-10-11T18:04:07Z | 2020-10-12T15:05:16Z | 2020-10-12T15:05:15Z | 2020-10-12T17:01:31Z |
Write pickle to file-like without intermediate in-memory buffer | diff --git a/asv_bench/benchmarks/io/pickle.py b/asv_bench/benchmarks/io/pickle.py
index 4ca9a82ae4827..656fe2197bc8a 100644
--- a/asv_bench/benchmarks/io/pickle.py
+++ b/asv_bench/benchmarks/io/pickle.py
@@ -24,5 +24,11 @@ def time_read_pickle(self):
def time_write_pickle(self):
self.df.to_pickle(self.fn... | Before this change, calling `pickle.dumps()` created an in-memory byte buffer, negating the advantage
of zero-copy pickle protocol 5. After this change, `pickle.dump` writes directly to open file(-like),
cutting peak memory in half in most cases.
Profiling was done with pandas@master and python 3.8.5
Related is... | https://api.github.com/repos/pandas-dev/pandas/pulls/37056 | 2020-10-11T16:15:57Z | 2020-10-14T12:27:39Z | 2020-10-14T12:27:38Z | 2020-10-14T12:27:44Z |
ENH: Use Kahan summation and Welfords method to calculate rolling var and std | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index da7dcc6ab29b9..74534bc371094 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -192,6 +192,7 @@ Other enhancements
- Added methods :meth:`IntegerArray.prod`, :meth:`IntegerArray.min`, and :meth:`Integer... | - [x] xref #37051
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
As suggested by @mroeschke Kahan summation fixes the numerical problems. Additionally I used Welfords Method to calculate ``ssqdm``, because previousl... | https://api.github.com/repos/pandas-dev/pandas/pulls/37055 | 2020-10-11T15:56:35Z | 2020-10-12T22:53:38Z | 2020-10-12T22:53:38Z | 2020-10-14T20:04:13Z |
troubleshoot CI | diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py
index ef7c4be20e22e..ac33909633f11 100644
--- a/pandas/tests/tools/test_to_datetime.py
+++ b/pandas/tests/tools/test_to_datetime.py
@@ -832,7 +832,7 @@ def test_datetime_invalid_scalar(self, value, format, infer):
ms... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37054 | 2020-10-11T14:58:51Z | 2020-10-11T16:06:15Z | null | 2020-10-11T17:41:39Z |
CI clean pre-commit: upgrade isort, use correct file types in flake8 | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 39fe509c6cd29..5b8b58a6a82f8 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,24 +9,23 @@ repos:
- id: flake8
additional_dependencies: [flake8-comprehensions>=3.1.0]
- id: flake8
- name: flake8-pyx... | A few things here:
- updating isort version
- updating to use `types` instead of `files` (see https://github.com/pre-commit/pre-commit/issues/1436#issuecomment-624219819 and https://github.com/PyCQA/isort/pull/1549#issuecomment-706621474)
- removing `exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$` as it's no... | https://api.github.com/repos/pandas-dev/pandas/pulls/37052 | 2020-10-11T14:13:19Z | 2020-10-11T16:05:13Z | 2020-10-11T16:05:13Z | 2020-10-11T16:08:26Z |
CLN: core/dtypes/cast.py::maybe_downcast_to_dtype | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index a7379376c2f78..336d33cd35d7a 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -2,6 +2,7 @@
Routines for casting.
"""
+from contextlib import suppress
from datetime import date, datetime, timedelta
from typing imp... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37050 | 2020-10-11T04:17:50Z | 2020-10-14T12:32:43Z | 2020-10-14T12:32:43Z | 2020-10-14T16:15:11Z |
REF: use OpsMixin in EAs | diff --git a/pandas/core/arrays/boolean.py b/pandas/core/arrays/boolean.py
index 4dd117e407961..9ffe00cf3189a 100644
--- a/pandas/core/arrays/boolean.py
+++ b/pandas/core/arrays/boolean.py
@@ -6,7 +6,6 @@
from pandas._libs import lib, missing as libmissing
from pandas._typing import ArrayLike
-from pandas.compat im... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37049 | 2020-10-11T03:15:15Z | 2020-10-11T20:03:29Z | 2020-10-11T20:03:29Z | 2020-10-11T20:19:31Z |
TST: Fix failing test from #37027 | diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py
index ef7c4be20e22e..63f9a2532fa73 100644
--- a/pandas/tests/tools/test_to_datetime.py
+++ b/pandas/tests/tools/test_to_datetime.py
@@ -832,7 +832,7 @@ def test_datetime_invalid_scalar(self, value, format, infer):
ms... | Part of #30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` | https://api.github.com/repos/pandas-dev/pandas/pulls/37048 | 2020-10-11T03:11:57Z | 2020-10-11T13:32:59Z | 2020-10-11T13:32:58Z | 2020-10-11T13:33:48Z |
REF: back IntervalArray by a single ndarray | diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py
index a06e0c74ec03b..d943fe3df88c5 100644
--- a/pandas/core/arrays/interval.py
+++ b/pandas/core/arrays/interval.py
@@ -1,5 +1,6 @@
from operator import le, lt
import textwrap
+from typing import TYPE_CHECKING, Optional, Tuple, Union, cast
... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
The main motivation here is for perf for methods that current cast to object dtype, including value_counts, set ops, values_for_(argsort|factorize)
... | https://api.github.com/repos/pandas-dev/pandas/pulls/37047 | 2020-10-11T02:43:36Z | 2020-10-12T23:28:48Z | 2020-10-12T23:28:48Z | 2020-11-18T16:12:44Z |
DOC: Add whatsnew for #36727 | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index cd5f8d3f88466..aa2c77da4ee6f 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -19,6 +19,7 @@ Fixed regressions
- Fixed regression where :meth:`DataFrame.agg` would fail with :exc:`TypeError` when passe... | xref #36727
Was not quick enough to add a whatsnew with the PR when 1.1.4 whatsnew was merged. | https://api.github.com/repos/pandas-dev/pandas/pulls/37046 | 2020-10-10T23:40:39Z | 2020-10-11T13:44:10Z | 2020-10-11T13:44:10Z | 2020-10-12T19:01:29Z |
MYPY: Delete unnecessary unused type hint | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index 3ad9f195c3cae..1cea817abbaa3 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -496,9 +496,7 @@ def maybe_casted_values(index, codes=None):
values, _ = maybe_upcast_putmask(values, mask, np.nan)
... | cc @jreback | https://api.github.com/repos/pandas-dev/pandas/pulls/37045 | 2020-10-10T23:29:24Z | 2020-10-11T02:21:54Z | 2020-10-11T02:21:53Z | 2020-10-11T09:55:51Z |
REF/TYP: use OpsMixin for DataFrame | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 0314bdc4ee8ed..43c87cc919980 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -124,6 +124,7 @@
relabel_result,
transform,
)
+from pandas.core.arraylike import OpsMixin
from pandas.core.arrays import Categorical, ExtensionArray
fr... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
made possible by #36483 | https://api.github.com/repos/pandas-dev/pandas/pulls/37044 | 2020-10-10T22:53:56Z | 2020-10-11T21:00:37Z | 2020-10-11T21:00:37Z | 2020-10-11T21:57:38Z |
ENH: Implement sem for Rolling and Expanding | diff --git a/doc/source/reference/window.rst b/doc/source/reference/window.rst
index 611c0e0f7f160..77697b966df18 100644
--- a/doc/source/reference/window.rst
+++ b/doc/source/reference/window.rst
@@ -32,6 +32,7 @@ Standard moving window functions
Rolling.apply
Rolling.aggregate
Rolling.quantile
+ Rolling... | - [x] closes #26476
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
I added sem to the Rolling and Expanding API as mentioned in the issue linked above. | https://api.github.com/repos/pandas-dev/pandas/pulls/37043 | 2020-10-10T22:39:15Z | 2020-10-12T15:30:03Z | 2020-10-12T15:30:03Z | 2020-10-12T19:01:47Z |
DOC: Add summary to interpolate | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 86b6c4a6cf575..5e5a77fe24cb5 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -6838,6 +6838,8 @@ def interpolate(
**kwargs,
) -> Optional[FrameOrSeries]:
"""
+ Fill NaN values using an interpolation metho... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
The interpolate method was missing a short summary. I hope this addition is reasonable. Happy to change it with feedback. | https://api.github.com/repos/pandas-dev/pandas/pulls/37042 | 2020-10-10T22:35:53Z | 2020-10-15T01:45:10Z | 2020-10-15T01:45:10Z | 2020-10-15T01:45:22Z |
BUG: set value with iloc and list like indexer | diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py
index a49c0741b64fe..11fb17062bdba 100644
--- a/pandas/core/indexing.py
+++ b/pandas/core/indexing.py
@@ -21,6 +21,7 @@
is_object_dtype,
is_scalar,
is_sequence,
+ is_categorical_dtype
)
from pandas.core.dtypes.concat import concat_compat... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37041 | 2020-10-10T22:25:35Z | 2020-10-27T11:18:54Z | null | 2020-10-27T11:18:54Z |
CLN: remove unnecessary DatetimeTZBlock.fillna | diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index 8346b48539887..ac210ecbaad5f 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -2090,13 +2090,7 @@ def _can_hold_element(self, element: Any) -> bool:
class DatetimeLikeBlockMixin(Block):
"""Mix... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
and no need to have TimeDeltaBlock inherit from IntBlock | https://api.github.com/repos/pandas-dev/pandas/pulls/37040 | 2020-10-10T22:14:54Z | 2020-10-11T16:32:34Z | 2020-10-11T16:32:34Z | 2020-10-11T17:36:16Z |
CI: move py39 build to conda #33948 | diff --git a/.travis.yml b/.travis.yml
index 2bf72bd159fc2..1ddd886699d38 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,11 +35,6 @@ matrix:
fast_finish: true
include:
- - dist: bionic
- python: 3.9-dev
- env:
- - JOB="3.9-dev" PATTERN="(not slow and not network and not clipboard)"
-
... | - [x] closes #33948
| https://api.github.com/repos/pandas-dev/pandas/pulls/37039 | 2020-10-10T21:20:55Z | 2020-11-14T02:27:33Z | 2020-11-14T02:27:33Z | 2020-12-05T18:51:43Z |
REF/TYP: define Index methods non-dynamically | diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py
index aece69d49a68b..b3f5fb6f0291a 100644
--- a/pandas/core/indexes/base.py
+++ b/pandas/core/indexes/base.py
@@ -5418,29 +5418,23 @@ def _arith_method(self, other, op):
return (Index(result[0]), Index(result[1]))
return Index(... | - [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37038 | 2020-10-10T20:51:01Z | 2020-10-12T15:31:19Z | 2020-10-12T15:31:19Z | 2020-10-12T15:35:13Z |
Fixed metadata propagation in DataFrame.__getitem__ | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 09cb024cbd95c..b01df3c693b97 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -591,6 +591,7 @@ Other
- Bug in :meth:`DataFrame.replace` and :meth:`Series.replace` incorrectly casting from ``PeriodDtype... | xref #28283 | https://api.github.com/repos/pandas-dev/pandas/pulls/37037 | 2020-10-10T18:58:19Z | 2020-11-15T17:27:49Z | 2020-11-15T17:27:49Z | 2020-11-15T17:27:53Z |
CLN: clean libreduction | diff --git a/pandas/_libs/reduction.pyx b/pandas/_libs/reduction.pyx
index 3a0fda5aed620..9459cd297c758 100644
--- a/pandas/_libs/reduction.pyx
+++ b/pandas/_libs/reduction.pyx
@@ -1,7 +1,5 @@
from copy import copy
-from cython import Py_ssize_t
-
from libc.stdlib cimport free, malloc
import numpy as np
@@ -11,1... | https://api.github.com/repos/pandas-dev/pandas/pulls/37036 | 2020-10-10T18:26:25Z | 2020-10-10T22:21:15Z | 2020-10-10T22:21:15Z | 2022-11-18T02:21:11Z | |
API: reimplement FixedWindowIndexer.get_window_bounds | diff --git a/doc/source/whatsnew/v1.2.0.rst b/doc/source/whatsnew/v1.2.0.rst
index 57e3c9dd66afb..a2067cf78315c 100644
--- a/doc/source/whatsnew/v1.2.0.rst
+++ b/doc/source/whatsnew/v1.2.0.rst
@@ -444,6 +444,7 @@ Groupby/resample/rolling
- Bug in :meth:`Rolling.count` returned ``np.nan`` with :class:`pandas.api.indexe... | - [x] closes #36040
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
This PR replaces [36132](https://github.com/pandas-dev/pandas/pull/36132) following @mroeschke's [36567](https://github.com/pandas-dev/pandas/pull/3... | https://api.github.com/repos/pandas-dev/pandas/pulls/37035 | 2020-10-10T15:54:29Z | 2020-10-10T22:30:51Z | 2020-10-10T22:30:51Z | 2020-10-10T22:30:54Z |
REGR: Fix casting of None to str during astype | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index 3ad8d981be2c9..ca58239dccb8d 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -17,6 +17,7 @@ Fixed regressions
- Fixed regression where attempting to mutate a :class:`DateOffset` object would no longer... | - [x] closes #36904
- [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/37034 | 2020-10-10T15:45:00Z | 2020-10-10T18:24:59Z | 2020-10-10T18:24:59Z | 2020-10-12T14:00:04Z |
CLN: Simplify aggregation.aggregate | diff --git a/pandas/core/aggregation.py b/pandas/core/aggregation.py
index 74359c8831745..ba7638e269fc0 100644
--- a/pandas/core/aggregation.py
+++ b/pandas/core/aggregation.py
@@ -608,92 +608,41 @@ def aggregate(obj, arg: AggFuncType, *args, **kwargs):
from pandas.core.reshape.concat import concat
- ... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37033 | 2020-10-10T15:29:54Z | 2020-10-10T23:25:34Z | 2020-10-10T23:25:34Z | 2020-10-11T13:15:21Z |
DOC: Group relevant df.mask/df.where examples together | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 338b45b5503dc..cf9b90ef83749 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -9088,7 +9088,6 @@ def where(
3 3.0
4 4.0
dtype: float64
-
>>> s.mask(s > 0)
0 0.0
1 NaN
@... | df.mask() and df.where() are complementary and so they share docs, see [here](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.mask.html). I grouped related examples together.
- [x] Close #25187
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/maste... | https://api.github.com/repos/pandas-dev/pandas/pulls/37032 | 2020-10-10T15:02:19Z | 2020-10-10T17:26:25Z | 2020-10-10T17:26:25Z | 2020-10-11T02:35:32Z |
DOC: Clarify display.precision | diff --git a/pandas/core/config_init.py b/pandas/core/config_init.py
index bfe20551cbcfc..541ecd9df6fc7 100644
--- a/pandas/core/config_init.py
+++ b/pandas/core/config_init.py
@@ -85,8 +85,9 @@ def use_numba_cb(key):
pc_precision_doc = """
: int
- Floating point output precision (number of significant digits). ... | - [x] closes #21004
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
| https://api.github.com/repos/pandas-dev/pandas/pulls/37030 | 2020-10-10T14:36:37Z | 2020-10-12T15:09:05Z | 2020-10-12T15:09:05Z | 2020-10-17T02:51:06Z |
DOC: Improve what the `axis=` kwarg does for generic methods | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 86b6c4a6cf575..dd1e03056b702 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -10732,7 +10732,7 @@ def all(self, axis=0, bool_only=None, skipna=True, level=None, **kwargs):
@doc(
desc="Return the mean absolute ... | ### [`axis=0` or `axis=1`, which is it?](https://github.com/pandas-dev/pandas/issues/29203#issue-511923432)
Opening a PR to discuss #29203 on what it means to do `df.sum(axis=0)` versus `df.sum(axis=1)`. The docs does not make it intuitively clear to the user. I propose a simple change where **"summing across`axis=0`"... | https://api.github.com/repos/pandas-dev/pandas/pulls/37029 | 2020-10-10T13:04:41Z | 2020-10-12T15:35:01Z | 2020-10-12T15:35:00Z | 2020-10-12T15:35:49Z |
TST: insert 'match' to bare pytest raises in pandas/tests/tools/test_… | diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py
index 819474e1f32e7..ef7c4be20e22e 100644
--- a/pandas/tests/tools/test_to_datetime.py
+++ b/pandas/tests/tools/test_to_datetime.py
@@ -349,7 +349,9 @@ def test_to_datetime_parse_tzname_or_tzoffset_different_tz_to_utc(self):
... | - [ ] ref https://github.com/pandas-dev/pandas/issues/30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37027 | 2020-10-10T11:22:23Z | 2020-10-10T16:02:08Z | 2020-10-10T16:02:07Z | 2020-10-11T03:12:26Z |
TST: insert 'match' to bare pytest raises in pandas/tests/test_flags.py | diff --git a/pandas/tests/test_flags.py b/pandas/tests/test_flags.py
index f6e3ae4980afb..9294b3fc3319b 100644
--- a/pandas/tests/test_flags.py
+++ b/pandas/tests/test_flags.py
@@ -41,8 +41,8 @@ def test_getitem(self):
flags["allows_duplicate_labels"] = False
assert flags["allows_duplicate_labels"] is... | - [ ] ref https://github.com/pandas-dev/pandas/issues/30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37026 | 2020-10-10T09:02:17Z | 2020-10-10T16:02:57Z | 2020-10-10T16:02:57Z | 2020-10-10T16:03:01Z |
DOC: Clarified pandas_version in to_json | diff --git a/pandas/core/generic.py b/pandas/core/generic.py
index 338b45b5503dc..0290f74eb41df 100644
--- a/pandas/core/generic.py
+++ b/pandas/core/generic.py
@@ -2274,6 +2274,10 @@ def to_json(
and the default ``indent=None`` are equivalent in pandas, though this
may change in a future release.
+... | - [X] closes #26637
- [ ] tests added / passed
- [X] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37025 | 2020-10-10T08:35:54Z | 2020-10-14T12:33:58Z | 2020-10-14T12:33:58Z | 2020-10-14T12:46:19Z |
TYP: core/dtypes/cast.py | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index a7379376c2f78..1dce5c2be809b 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -3,7 +3,18 @@
"""
from datetime import date, datetime, timedelta
-from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type
+fr... | - [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37024 | 2020-10-10T06:32:00Z | 2020-10-14T12:35:15Z | 2020-10-14T12:35:15Z | 2020-10-14T12:35:20Z |
REGR: fix bug in DatetimeIndex slicing with irregular or unsorted indices | diff --git a/doc/source/whatsnew/v1.1.4.rst b/doc/source/whatsnew/v1.1.4.rst
index eb68ca38ea5b6..eefc1284c1285 100644
--- a/doc/source/whatsnew/v1.1.4.rst
+++ b/doc/source/whatsnew/v1.1.4.rst
@@ -22,6 +22,7 @@ Fixed regressions
- Fixed regression in :class:`RollingGroupby` causing a segmentation fault with Index of d... | closes #36953
closes #35509
- [x] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/37023 | 2020-10-10T06:30:19Z | 2020-10-26T14:51:58Z | 2020-10-26T14:51:58Z | 2020-10-26T15:15:06Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.