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 |
|---|---|---|---|---|---|---|---|
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 |
ENH: use native filesystem (if available) for read_parquet with pyarrow engine | diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py
index 56131d000b176..3b8077c531996 100644
--- a/pandas/io/parquet.py
+++ b/pandas/io/parquet.py
@@ -173,9 +173,25 @@ def write(
table = self.api.Table.from_pandas(df, **from_pandas_kwargs)
+ filesystem = kwargs.pop("filesystem", None)
+ ... | Some timings in https://issues.apache.org/jira/browse/ARROW-12428 suggest that it can be beneficial for reading parquet from S3 to use the pyarrow filesystem implementation, instead of pandas always using fsspec if installed (especially when selecting columns). | https://api.github.com/repos/pandas-dev/pandas/pulls/41194 | 2021-04-28T10:13:54Z | 2023-02-22T13:19:43Z | null | 2023-02-22T13:19:44Z |
BUG: dataframe setitem error on size incompatible assignment | diff --git a/pandas/core/internals/managers.py b/pandas/core/internals/managers.py
index 487047f1a1dbb..c5638813054ec 100644
--- a/pandas/core/internals/managers.py
+++ b/pandas/core/internals/managers.py
@@ -1233,6 +1233,12 @@ def value_getitem(placement):
blk = self.blocks[blkno]
blk_locs = ... | - [ ] closes #40827
- [ ] 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
I've labeled the error something silly but that can be fixed later.
This pull request replaces this older pr ... | https://api.github.com/repos/pandas-dev/pandas/pulls/41193 | 2021-04-28T09:55:56Z | 2021-08-08T01:02:35Z | null | 2021-08-08T01:02:36Z |
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: use DTypeLike alias from numpy.typing | diff --git a/pandas/_typing.py b/pandas/_typing.py
index a58dc0dba1bf1..c9031b52a90d1 100644
--- a/pandas/_typing.py
+++ b/pandas/_typing.py
@@ -11,7 +11,7 @@
)
from mmap import mmap
from os import PathLike
-from typing import (
+from typing import ( # noqa: F401
IO,
TYPE_CHECKING,
Any,
@@ -32,6 +32,... | https://api.github.com/repos/pandas-dev/pandas/pulls/41185 | 2021-04-27T19:23:09Z | 2021-05-01T12:13:44Z | null | 2021-06-01T21:48:29Z | |
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 |
Documentation: DataFrame on df.nunique causing confusion | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index c9267a756bef3..d4a179903e174 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -753,7 +753,7 @@ Plotting
- Prevent warnings when matplotlib's ``constrained_layout`` is enabled (:issue:`25261`)
- Bug in... | - [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/41181 | 2021-04-27T15:24:05Z | 2021-04-27T15:25:34Z | null | 2021-04-27T15:25:34Z |
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 |
WIP: avoid zip and unzip to improve the speed of get_indexer | diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx
index f7cec262ca302..5221e33e049f3 100644
--- a/pandas/_libs/index.pyx
+++ b/pandas/_libs/index.pyx
@@ -584,7 +584,7 @@ cdef class BaseMultiIndexCodesEngine:
def _codes_to_ints(self, ndarray[uint64_t] codes) -> np.ndarray:
raise NotImplementedEr... | - [x] closes #23735 #34531
- [ ] 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] improve the speed for get_index by avoiding some redundant zipping and unzipping | https://api.github.com/repos/pandas-dev/pandas/pulls/41177 | 2021-04-27T07:46:58Z | 2021-05-14T07:27:59Z | null | 2021-05-14T07:27:59Z |
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 |
fixed formatting on to_csv() for categorical datetypes | diff --git a/ctypes.__init__.cover b/ctypes.__init__.cover
new file mode 100644
index 0000000000000..6431a41b9cddb
--- /dev/null
+++ b/ctypes.__init__.cover
@@ -0,0 +1,568 @@
+ 1: """create and manipulate C data types in Python"""
+
+ 1: import os as _os, sys as _sys
+
+ 1: __version__ = "1.1.0"
... | - [ ] 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/41173 | 2021-04-26T23:43:53Z | 2021-06-25T16:10:35Z | null | 2021-06-25T16:10:35Z |
fixed formatting on to_csv() for categorical datetypes | diff --git a/ctypes.__init__.cover b/ctypes.__init__.cover
new file mode 100644
index 0000000000000..6431a41b9cddb
--- /dev/null
+++ b/ctypes.__init__.cover
@@ -0,0 +1,568 @@
+ 1: """create and manipulate C data types in Python"""
+
+ 1: import os as _os, sys as _sys
+
+ 1: __version__ = "1.1.0"
... | - [ ] 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/41172 | 2021-04-26T23:38:14Z | 2021-04-26T23:43:03Z | null | 2021-04-26T23:43:03Z |
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 |
BUG: pandas concat does not match index names when concatenating two dataframes with a multiindex | diff --git a/asv_bench/benchmarks/multiindex_object.py b/asv_bench/benchmarks/multiindex_object.py
index 25df5b0214959..17ded2ef2f9b1 100644
--- a/asv_bench/benchmarks/multiindex_object.py
+++ b/asv_bench/benchmarks/multiindex_object.py
@@ -232,4 +232,17 @@ def time_operation(self, index_structure, dtype, method):
... | - [x] closes #40849
- [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/41162 | 2021-04-26T08:18:46Z | 2021-08-17T00:48:50Z | null | 2021-08-17T00:48:50Z |
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 |
API: `Styler.hide_columns` replaced by `.hide_values` which also operates row-wise | diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py
index 02e1369a05b93..dab5c54b40cd7 100644
--- a/pandas/io/formats/style.py
+++ b/pandas/io/formats/style.py
@@ -28,6 +28,7 @@
from pandas.util._decorators import doc
import pandas as pd
+from pandas import IndexSlice
from pandas.api.types import ... | For showing and hiding columns/rows `Styler` currently has two methods:
- `.hide_columns(subset)`: which hides a selection of columns and the associated data values.
- `.hide_index()`: which hides the index keys completely and displays all the data values.
This PR adds a `.hide_values(subset, axis, show)` meth... | https://api.github.com/repos/pandas-dev/pandas/pulls/41158 | 2021-04-26T06:34:02Z | 2021-05-07T12:58:54Z | null | 2021-07-05T11:05:36Z |
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: isin fails to correctly compare None values. | diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst
index e42360558d284..9ebacabd7a839 100644
--- a/doc/source/whatsnew/v1.4.0.rst
+++ b/doc/source/whatsnew/v1.4.0.rst
@@ -291,6 +291,7 @@ Styler
Other
^^^^^
- Bug in :meth:`CustomBusinessMonthBegin.__add__` (:meth:`CustomBusinessMonthEnd.__ad... | - [x] closes #35565
- [ ] 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
- [x] whatsnew entry
| https://api.github.com/repos/pandas-dev/pandas/pulls/41145 | 2021-04-24T20:06:14Z | 2021-10-04T00:24:41Z | null | 2021-10-04T00:24:41Z |
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 |
add type hint for 'data' argument in DataFrame's from_dict method: Un… | diff --git a/pandas/core/frame.py b/pandas/core/frame.py
index 7f970a72cb12c..21535717e647c 100644
--- a/pandas/core/frame.py
+++ b/pandas/core/frame.py
@@ -1458,7 +1458,7 @@ def __rmatmul__(self, other):
@classmethod
def from_dict(
cls,
- data,
+ data: dict | list,
orient: str... | …ion[dict, list]
- [ ] 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/41136 | 2021-04-24T13:55:57Z | 2021-06-22T08:21:26Z | null | 2021-06-22T08:21:27Z |
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 |
Deprecated usecols with out of bounds indices in read_csv with c engine | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 842b50ce53b21..bc301fad730df 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -611,6 +611,7 @@ Deprecations
- Deprecated the ``level`` keyword for :class:`DataFrame` and :class:`Series` aggregations; u... | - [x] closes #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
Deprecation for c parser | https://api.github.com/repos/pandas-dev/pandas/pulls/41129 | 2021-04-23T22:40:33Z | 2021-05-12T18:05:56Z | null | 2021-12-15T10:37:05Z |
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 |
PERF/REF: Check use of numexpr earlier in the DataFrame operation | diff --git a/pandas/core/computation/expressions.py b/pandas/core/computation/expressions.py
index a8852ae06f578..fb8d3eb3ab2df 100644
--- a/pandas/core/computation/expressions.py
+++ b/pandas/core/computation/expressions.py
@@ -72,12 +72,59 @@ def _evaluate_standard(op, op_str, a, b):
return op(a, b)
+def can... | This PR tries to gather some checks about whether numexpr can be used or not which can be done upfront on the DataFrame level, before dispatching to the array_ops.
For example, for a scalar right operand, we can check it only once if it's compatible with numexpr usage. Or for ArrayManager, we can check the size const... | https://api.github.com/repos/pandas-dev/pandas/pulls/41122 | 2021-04-23T12:49:00Z | 2021-11-07T19:11:07Z | null | 2021-11-07T19:11:07Z |
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 |
Revert "REF: Back DatetimeTZBlock with sometimes-2D DTA" | diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py
index 593e42f7ed749..e207dac71752e 100644
--- a/pandas/core/dtypes/common.py
+++ b/pandas/core/dtypes/common.py
@@ -1413,33 +1413,6 @@ def is_extension_type(arr) -> bool:
return False
-def is_1d_only_ea_obj(obj: Any) -> bool:
- """
- ... | Just checking to see if this is what is causing the CI failures (cant check locally bc older pyarrow install fails) | https://api.github.com/repos/pandas-dev/pandas/pulls/41110 | 2021-04-23T01:29:11Z | 2021-04-23T14:39:21Z | null | 2021-04-23T14:39:25Z |
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: read_json not reading in large ints properly | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 0e567972e7823..ab7d34cc5a620 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -795,6 +795,7 @@ I/O
- Bug in :func:`read_sas` raising ``ValueError`` when ``datetimes`` were null (:issue:`39725`)
- Bug ... | - [x] closes #20608
- [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/41107 | 2021-04-22T23:11:29Z | 2021-04-27T21:59:24Z | null | 2021-05-04T14:18:56Z |
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 |
[ArrayManager] Array version of fillna logic | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index 79ea7731466d4..90bd61c49d060 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -1850,6 +1850,17 @@ def find_common_type(types: list[DtypeObj]) -> DtypeObj:
return np.find_common_type(types, []) # type: ignore[arg-... | xref https://github.com/pandas-dev/pandas/issues/39146
I was looking into getting rid of the Block fallback (`apply_with_block`) for `fillna` in ArrayManager. For that, I started with putting the bits and pieces from the several BlockManager methods (the different `fillna` implementations, maybe_downcast) together i... | https://api.github.com/repos/pandas-dev/pandas/pulls/41104 | 2021-04-22T20:54:05Z | 2023-02-22T15:53:24Z | null | 2023-02-22T15:53:25Z |
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 |
CLN: remove split_and_operate in Block.fillna | diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py
index 603cc6a6ff1f2..89ad369842e1b 100644
--- a/pandas/core/internals/blocks.py
+++ b/pandas/core/internals/blocks.py
@@ -457,16 +457,9 @@ def fillna(
# we can't process the value, but nothing to do
return [self] if... | I didn't see any tests failing locally, so checking here with full CI. | https://api.github.com/repos/pandas-dev/pandas/pulls/41099 | 2021-04-22T12:36:30Z | 2021-04-22T20:16:53Z | null | 2021-04-25T13:42:48Z |
ENH: `Styler.text_gradient`: easy extension alternative to `.background_gradient` | diff --git a/doc/source/_static/style/tg_ax0.png b/doc/source/_static/style/tg_ax0.png
new file mode 100644
index 0000000000000..3460329352282
Binary files /dev/null and b/doc/source/_static/style/tg_ax0.png differ
diff --git a/doc/source/_static/style/tg_axNone.png b/doc/source/_static/style/tg_axNone.png
new file mod... | This is minor code alteration to the `_background_gradient` function that permits a text-only coloring version, i.e. `Styler.text_gradient`.
This could alternatively be performed with a `text_only=True` keyword addition to `Styler.background_gradient` existing method, but it seemed dissimilar enough to merit its own... | https://api.github.com/repos/pandas-dev/pandas/pulls/41098 | 2021-04-22T12:29:41Z | 2021-05-25T09:04:19Z | 2021-05-25T09:04:19Z | 2021-05-25T09:36:23Z |
TYP: Fix typehints for ExtensionDtype | diff --git a/pandas/core/dtypes/base.py b/pandas/core/dtypes/base.py
index 8104b0170fbe2..9671c340a0a92 100644
--- a/pandas/core/dtypes/base.py
+++ b/pandas/core/dtypes/base.py
@@ -7,6 +7,7 @@
from typing import (
TYPE_CHECKING,
Any,
+ TypeVar,
)
import numpy as np
@@ -26,6 +27,9 @@
if TYPE_CHECKING:... | This is a fix for type hints of `ExtensionDtype`. `register_extension_dtype` was confusing pyright autocomplete. It was fixed by parameterizing its return value on its input value.
Example:
```python
import pandas as pd
pd.CategoricalDtype(categories=['a', 'b'])
```
Before this change:
```console
$ pyri... | https://api.github.com/repos/pandas-dev/pandas/pulls/41097 | 2021-04-22T12:23:49Z | 2021-04-26T10:39:44Z | 2021-04-26T10:39:44Z | 2021-04-26T11:40:01Z |
Backport PR #41092: CI/DOC: temporary pin environment to python 3.8 | diff --git a/environment.yml b/environment.yml
index a369f656cb575..61c8351070de9 100644
--- a/environment.yml
+++ b/environment.yml
@@ -4,7 +4,7 @@ channels:
dependencies:
# required
- numpy>=1.16.5
- - python=3
+ - python=3.8
- python-dateutil>=2.7.3
- pytz
| Backport PR #41092 | https://api.github.com/repos/pandas-dev/pandas/pulls/41095 | 2021-04-22T11:18:13Z | 2021-04-22T13:29:31Z | 2021-04-22T13:29:31Z | 2021-04-22T13:29:36Z |
CI/DOC: temporary pin environment to python 3.8 | diff --git a/environment.yml b/environment.yml
index 0d03ad8e0a46a..2e0228a15272e 100644
--- a/environment.yml
+++ b/environment.yml
@@ -4,7 +4,7 @@ channels:
dependencies:
# required
- numpy>=1.17.3
- - python=3
+ - python=3.8
- python-dateutil>=2.7.3
- pytz
| The doc build is failing on master (`/home/runner/work/pandas/pandas/doc/source/reference/api/pandas.Series.dt.rst: WARNING: document isn't included in any toctree`), and the build that starts failing seems to have switched from python 3.8 to 3.9 (I don't see any other relevant change in the environment). I suppose the... | https://api.github.com/repos/pandas-dev/pandas/pulls/41092 | 2021-04-22T07:07:53Z | 2021-04-22T11:00:17Z | 2021-04-22T11:00:17Z | 2021-04-22T11:22:14Z |
REF: simplify ohlc | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index a059a90aa3a4e..9d6d2d698dfe5 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -363,20 +363,10 @@ def _cython_agg_general(
result = self.grouper._cython_operation(
"aggregat... | Or more accurately, simplify BaseGroupBy._cython_agg_general by not having ohlc go through it. This will in turn allow us to simplify SeriesGroupBy._wrap_aggregated_output.
This will have a merge conflict with #41066. Doesn't matter which order they are merged in. | https://api.github.com/repos/pandas-dev/pandas/pulls/41091 | 2021-04-22T00:59:22Z | 2021-04-23T01:47:10Z | 2021-04-23T01:47:10Z | 2021-04-23T01:54:53Z |
CLN: annotations, docstrings | diff --git a/pandas/_libs/hashtable_class_helper.pxi.in b/pandas/_libs/hashtable_class_helper.pxi.in
index 4dc5e7516db7e..a25867c4a3b0c 100644
--- a/pandas/_libs/hashtable_class_helper.pxi.in
+++ b/pandas/_libs/hashtable_class_helper.pxi.in
@@ -687,7 +687,10 @@ cdef class {{name}}HashTable(HashTable):
{{if dtype... | Remove a no-longer-needed Categorical kludge in wrap_setop_result
isinstance(obj, ABCMultiIndex) -> isinstance(obj, MultiIndex) in core.indexing | https://api.github.com/repos/pandas-dev/pandas/pulls/41089 | 2021-04-21T21:35:48Z | 2021-04-22T22:27:32Z | 2021-04-22T22:27:32Z | 2021-04-22T22:36:57Z |
Update license year | diff --git a/LICENSE b/LICENSE
index 76954a5a339ab..a0cc369f725b8 100644
--- a/LICENSE
+++ b/LICENSE
@@ -3,7 +3,7 @@ BSD 3-Clause License
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
All rights reserved.
-Copyright (c) 2011-2020, Open source contributors.
+C... | Saw this today | https://api.github.com/repos/pandas-dev/pandas/pulls/41087 | 2021-04-21T20:42:27Z | 2021-04-22T01:06:47Z | 2021-04-22T01:06:47Z | 2021-04-22T20:01:24Z |
REF: hide ArrayManager implementation details from GroupBy | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index 80351a832ec7e..ab03cce0d6476 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -97,7 +97,6 @@
all_indexes_same,
)
import pandas.core.indexes.base as ibase
-from pandas.core.internals import ArrayM... | - [ ] 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/41086 | 2021-04-21T19:38:42Z | 2021-04-30T18:50:01Z | 2021-04-30T18:50:01Z | 2021-04-30T19:00:20Z |
[ArrowStringArray] PERF: implement ArrowStringArray._str_split | diff --git a/asv_bench/benchmarks/strings.py b/asv_bench/benchmarks/strings.py
index 2e109e59c1c6d..700393cc72492 100644
--- a/asv_bench/benchmarks/strings.py
+++ b/asv_bench/benchmarks/strings.py
@@ -235,13 +235,31 @@ class Split(Dtypes):
def setup(self, dtype, expand):
super().setup(dtype)
- se... | marked as draft as performance issues with conversion from pyarrow result to numpy object array of lists
`str.rsplit` can probably also be added to this PR (the tests are parameterised, one failing for StringArray.. maybe precursor needed)
also issue with empty string
failing tests are xfailed.. maybe fix late... | https://api.github.com/repos/pandas-dev/pandas/pulls/41085 | 2021-04-21T19:33:20Z | 2021-05-24T19:40:09Z | null | 2021-05-24T19:40:10Z |
BUG: GH27721 - test groupby rank with multiindex | diff --git a/pandas/tests/groupby/test_rank.py b/pandas/tests/groupby/test_rank.py
index da88ea5f05107..e07c5f404a02a 100644
--- a/pandas/tests/groupby/test_rank.py
+++ b/pandas/tests/groupby/test_rank.py
@@ -578,3 +578,25 @@ def test_rank_pct_equal_values_on_group_transition(use_nan):
expected = Series([1 / 3... | - [x] closes #27721
- [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/41084 | 2021-04-21T19:07:43Z | 2021-04-21T21:55:34Z | 2021-04-21T21:55:33Z | 2021-04-21T22:23:35Z |
CI: ignore ResourceWarning in tm.assert_produces_warning | diff --git a/pandas/_testing/_warnings.py b/pandas/_testing/_warnings.py
index 027a53edb1810..391226b622a01 100644
--- a/pandas/_testing/_warnings.py
+++ b/pandas/_testing/_warnings.py
@@ -142,6 +142,14 @@ def _assert_caught_no_extra_warnings(
for actual_warning in caught_warnings:
if _is_unexpected_war... | reverts a line in setup.cfg that was intended to do this but failed | https://api.github.com/repos/pandas-dev/pandas/pulls/41083 | 2021-04-21T16:40:45Z | 2021-04-22T22:20:05Z | 2021-04-22T22:20:05Z | 2021-04-22T22:22:12Z |
REF: Back DatetimeTZBlock with sometimes-2D DTA | diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py
index e207dac71752e..593e42f7ed749 100644
--- a/pandas/core/dtypes/common.py
+++ b/pandas/core/dtypes/common.py
@@ -1413,6 +1413,33 @@ def is_extension_type(arr) -> bool:
return False
+def is_1d_only_ea_obj(obj: Any) -> bool:
+ """
+ ... | Same as #40149 but with the perf-improving edits to frame.py reverted | https://api.github.com/repos/pandas-dev/pandas/pulls/41082 | 2021-04-21T16:14:05Z | 2021-04-22T22:43:29Z | 2021-04-22T22:43:29Z | 2021-04-22T22:59:14Z |
REF: remove Block access in the JSON writing code | diff --git a/pandas/_libs/src/ujson/python/objToJSON.c b/pandas/_libs/src/ujson/python/objToJSON.c
index bbcee479aeb5a..31b43cdb28d9d 100644
--- a/pandas/_libs/src/ujson/python/objToJSON.c
+++ b/pandas/_libs/src/ujson/python/objToJSON.c
@@ -83,7 +83,6 @@ typedef struct __PdBlockContext {
int ncols;
int transp... | Closes #27164
This is a small refactor of the JSON writing code (`objToJSON.c`) to remove the access of the Blocks. Serializing to JSON was already done column-by-column (also when accessing the blocks), but currently we were iterating over the different "columns" of the 2D array per block in the C code. While with ... | https://api.github.com/repos/pandas-dev/pandas/pulls/41081 | 2021-04-21T14:33:46Z | 2021-04-26T07:51:29Z | 2021-04-26T07:51:28Z | 2021-04-26T07:51:32Z |
BUG: GH35865 - int cast to str with colon setitem | diff --git a/pandas/tests/indexing/test_coercion.py b/pandas/tests/indexing/test_coercion.py
index 7642f78076dcb..585dbd338e965 100644
--- a/pandas/tests/indexing/test_coercion.py
+++ b/pandas/tests/indexing/test_coercion.py
@@ -258,6 +258,15 @@ def test_setitem_series_timedelta64(self, val, exp_dtype):
)
... | - [x] closes #35865
- [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: not sure if it's needed but happy to provide one given some guidelines
| https://api.github.com/repos/pandas-dev/pandas/pulls/41077 | 2021-04-21T13:03:36Z | 2021-04-26T12:21:47Z | 2021-04-26T12:21:47Z | 2021-04-27T12:45:39Z |
BUG: GH41044 - test loc dict assig | diff --git a/pandas/tests/indexing/test_loc.py b/pandas/tests/indexing/test_loc.py
index 97b3412ce626e..11391efde4956 100644
--- a/pandas/tests/indexing/test_loc.py
+++ b/pandas/tests/indexing/test_loc.py
@@ -2700,3 +2700,13 @@ def test_loc_setitem(self, string_series):
string_series.loc[d2] = 6
asser... | - [x] closes #41044
- [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: not sure if it's needed but happy to provide one given some guidelines | https://api.github.com/repos/pandas-dev/pandas/pulls/41076 | 2021-04-21T12:31:54Z | 2021-04-21T22:34:07Z | 2021-04-21T22:34:07Z | 2021-04-21T22:52:59Z |
[ArrayManager] TST: enable JSON tests (except for table schema) | diff --git a/pandas/tests/io/json/test_compression.py b/pandas/tests/io/json/test_compression.py
index 8c69ffedf1df4..febeb4d690562 100644
--- a/pandas/tests/io/json/test_compression.py
+++ b/pandas/tests/io/json/test_compression.py
@@ -7,8 +7,6 @@
import pandas as pd
import pandas._testing as tm
-pytestmark = td.s... | xref https://github.com/pandas-dev/pandas/issues/39146
This already enables most of the JSON tests (it are only the table schema tests that are segfaulting). Those are mostly working because the JSON writer falls back to using `df.values`. This only gives some errors with datetime formatting, for which one test is s... | https://api.github.com/repos/pandas-dev/pandas/pulls/41075 | 2021-04-21T11:40:19Z | 2021-04-21T17:20:50Z | 2021-04-21T17:20:50Z | 2021-04-21T17:20:53Z |
TYP: Specify specific type for NumericIndex._values | diff --git a/pandas/core/indexes/numeric.py b/pandas/core/indexes/numeric.py
index 28144af36d6ea..cd75336ad7bdf 100644
--- a/pandas/core/indexes/numeric.py
+++ b/pandas/core/indexes/numeric.py
@@ -48,6 +48,7 @@ class NumericIndex(Index):
This is an abstract class.
"""
+ _values: np.ndarray
_default_... | Typing clean-up for numeric indexes. | https://api.github.com/repos/pandas-dev/pandas/pulls/41073 | 2021-04-21T10:47:20Z | 2021-04-21T21:54:07Z | 2021-04-21T21:54:07Z | 2021-06-13T10:08:10Z |
REF/TYP: implement NDFrameApply | diff --git a/pandas/core/apply.py b/pandas/core/apply.py
index 86cde647cc798..9a75857c2586d 100644
--- a/pandas/core/apply.py
+++ b/pandas/core/apply.py
@@ -137,14 +137,6 @@ def f(x):
self.orig_f: AggFuncType = func
self.f: AggFuncType = f
- @property
- def index(self) -> Index:
- retur... | if called from GroupByApply or ResamplerWindowApply, these would raise | https://api.github.com/repos/pandas-dev/pandas/pulls/41067 | 2021-04-21T03:39:56Z | 2021-04-28T15:18:49Z | 2021-04-28T15:18:49Z | 2021-04-28T15:53:23Z |
REF: BaseGroupBy methods belong in GroupBy | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index 4a721ae0d4bf6..a059a90aa3a4e 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -345,6 +345,49 @@ def _aggregate_multiple_funcs(self, arg):
)
return self.obj._constructor_expanddim(outpu... | BaseGroupBy is also subclassed by Resampler; if Resampler ever accessed these methods they'd get an AttributeError.
Once non-direct move is _cython_agg_general, where the implementation is moved to SeriesGroupBy instead of GroupBy, bc DataFrameGroupBy overrides it. | https://api.github.com/repos/pandas-dev/pandas/pulls/41066 | 2021-04-21T03:06:20Z | 2021-04-22T22:17:16Z | 2021-04-22T22:17:16Z | 2021-04-22T22:19:30Z |
REF: make maybe_cast_result_dtype a WrappedCythonOp method | diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py
index e91927d87d318..d739b46620032 100644
--- a/pandas/core/dtypes/cast.py
+++ b/pandas/core/dtypes/cast.py
@@ -406,42 +406,6 @@ def maybe_cast_pointwise_result(
return result
-def maybe_cast_result_dtype(dtype: DtypeObj, how: str) -> DtypeOb... | Abstraction-wise, this is a much better place for it. | https://api.github.com/repos/pandas-dev/pandas/pulls/41065 | 2021-04-21T02:45:29Z | 2021-04-23T01:45:31Z | 2021-04-23T01:45:31Z | 2021-04-23T01:46:28Z |
CLN: Clean-up numeric index dtype validation | diff --git a/pandas/core/indexes/numeric.py b/pandas/core/indexes/numeric.py
index 28144af36d6ea..2182b3647533e 100644
--- a/pandas/core/indexes/numeric.py
+++ b/pandas/core/indexes/numeric.py
@@ -1,6 +1,8 @@
+from __future__ import annotations
+
from typing import (
+ Callable,
Hashable,
- Optional,
)
im... | The use of a dict with `_typ` attributes as keys in `NumericIndex._validate_dtype` makes it complicated to subclass numeric indexes and change the subclass' `_typ` attribute.
This PR makes the dtype validation in `NumericIndex._validate_dtype` not dependent on the value of the `_typ` attribute, making subclassing mo... | https://api.github.com/repos/pandas-dev/pandas/pulls/41063 | 2021-04-20T22:43:48Z | 2021-04-21T12:43:55Z | 2021-04-21T12:43:55Z | 2022-02-06T11:49:39Z |
TST: GH39443 - categorical datetime concat | diff --git a/pandas/tests/reshape/concat/test_categorical.py b/pandas/tests/reshape/concat/test_categorical.py
index d8b5f19c6a745..7cf3a0009c016 100644
--- a/pandas/tests/reshape/concat/test_categorical.py
+++ b/pandas/tests/reshape/concat/test_categorical.py
@@ -1,3 +1,5 @@
+from datetime import datetime
+
import nu... | - [x] closes https://github.com/pandas-dev/pandas/issues/39443
- [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: Not added since I'm not sure whether it's necessa... | https://api.github.com/repos/pandas-dev/pandas/pulls/41061 | 2021-04-20T21:13:41Z | 2021-08-17T00:44:41Z | null | 2021-08-17T00:44:41Z |
TYP: libinterval | diff --git a/pandas/_libs/interval.pyi b/pandas/_libs/interval.pyi
new file mode 100644
index 0000000000000..0321bd026d83c
--- /dev/null
+++ b/pandas/_libs/interval.pyi
@@ -0,0 +1,89 @@
+import numpy as np
+
+from pandas import (
+ Timedelta,
+ Timestamp,
+)
+
+VALID_CLOSED: frozenset[str]
+
+
+class IntervalMixi... | This one is pretty ugly.
| https://api.github.com/repos/pandas-dev/pandas/pulls/41059 | 2021-04-20T18:01:31Z | 2021-06-12T18:15:22Z | null | 2021-06-12T18:15:28Z |
REF: move only-used-once mixins to resample | diff --git a/pandas/core/groupby/base.py b/pandas/core/groupby/base.py
index 50248d5af8883..7211fc1b71b54 100644
--- a/pandas/core/groupby/base.py
+++ b/pandas/core/groupby/base.py
@@ -7,83 +7,8 @@
import collections
-from pandas._typing import final
-
-from pandas.core.dtypes.common import (
- is_list_like,
- ... | - [ ] 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/41058 | 2021-04-20T17:46:47Z | 2021-04-20T22:54:47Z | 2021-04-20T22:54:47Z | 2021-04-20T23:01:14Z |
DOC: more accurate wording in roadmap | diff --git a/doc/source/development/roadmap.rst b/doc/source/development/roadmap.rst
index 8223edcf6f63a..37e45bf5a42b5 100644
--- a/doc/source/development/roadmap.rst
+++ b/doc/source/development/roadmap.rst
@@ -71,8 +71,8 @@ instead of comparing as False).
Long term, we want to introduce consistent missing data ha... | This came up the other day in https://github.com/pandas-dev/pandas/pull/40651#issuecomment-820671958. As I [originally](https://github.com/pandas-dev/pandas/pull/35208#issuecomment-656879885) said in the PR that put this inaccurate wording in, this overstates the degree to which there is consensus. | https://api.github.com/repos/pandas-dev/pandas/pulls/41057 | 2021-04-20T17:40:46Z | 2021-04-20T22:55:13Z | 2021-04-20T22:55:13Z | 2021-04-20T22:59:46Z |
[ArrowStringArray] Use utf8_upper and utf8_lower functions from Apache Arrow | diff --git a/pandas/core/arrays/string_arrow.py b/pandas/core/arrays/string_arrow.py
index ecbb5367febc5..dd09ef4e585ce 100644
--- a/pandas/core/arrays/string_arrow.py
+++ b/pandas/core/arrays/string_arrow.py
@@ -757,3 +757,9 @@ def _str_map(self, f, na_value=None, dtype: Dtype | None = None):
# or .fin... | ```
data = ["Mouse", "dog", "house and parrot", "23", np.NaN] * 100_000
s = pd.Series(data, dtype="string")
s1 = pd.Series(data, dtype="arrow_string")
%timeit s.str.upper()
# 63.8 ms ± 259 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
%timeit s1.str.upper()
# 92 ms ± 152 µs per loop (mean ± std. de... | https://api.github.com/repos/pandas-dev/pandas/pulls/41056 | 2021-04-20T15:01:06Z | 2021-04-20T22:58:18Z | 2021-04-20T22:58:18Z | 2021-07-03T15:10:13Z |
BUG: Handle zero-chunked pyarrow.ChunkedArray in StringArray | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 85d9acff353be..81f5ad34c53a0 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -700,7 +700,7 @@ Conversion
Strings
^^^^^^^
--
+- Bug in the conversion from ``pyarrow.ChunkedArray`` to :class:`~arrays... | - [x] closes #41040
- [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/41052 | 2021-04-20T08:06:20Z | 2021-04-21T19:44:50Z | 2021-04-21T19:44:50Z | 2021-04-22T08:19:28Z |
PERF: optimize conversion from boolean Arrow array to masked BooleanArray | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 85d9acff353be..74a302922c2aa 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -624,6 +624,7 @@ Performance improvements
- Performance improvement in :class:`Styler` where render times are more than 50%... | For arrays without missing values it doesn't change, but gives a decent speed-up when having missing values:
```
In [1]: arr1 = pa.array([True, False, True, True, False]*100_000)
In [2]: arr2 = pa.array([True, False, None, True, False]*100_000)
In [3]: %timeit pd.BooleanDtype().__from_arrow__(arr1)
9.34 ms ±... | https://api.github.com/repos/pandas-dev/pandas/pulls/41051 | 2021-04-20T07:52:10Z | 2021-04-21T16:09:14Z | 2021-04-21T16:09:14Z | 2021-04-21T16:09:18Z |
DOC: Improve to_datetime() documentation | diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py
index 77bbde62d607e..d4c3760f3e629 100644
--- a/pandas/core/tools/datetimes.py
+++ b/pandas/core/tools/datetimes.py
@@ -851,8 +851,19 @@ def to_datetime(
>>> pd.to_datetime([1, 2, 3], unit='D',
... origin=pd.Timestam... | Returns Object Type Index when Mixed Timezones are used in list-like input to pandas.to_datetime()
- [x] closes #40808
- [ ] 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
- [ ] whats... | https://api.github.com/repos/pandas-dev/pandas/pulls/41049 | 2021-04-20T03:26:33Z | 2021-04-21T16:24:18Z | 2021-04-21T16:24:18Z | 2021-04-21T16:24:23Z |
REF: remove no-op casting in groupby.generic | diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py
index a381a7bcb33f5..4a721ae0d4bf6 100644
--- a/pandas/core/groupby/generic.py
+++ b/pandas/core/groupby/generic.py
@@ -46,7 +46,6 @@
from pandas.core.dtypes.cast import (
find_common_type,
- maybe_cast_result_dtype,
maybe_down... | Simplify _get_cython_function
Raise TypeError instead of NotImplementedError in cases where we shouldn't bother falling back to py_fallback | https://api.github.com/repos/pandas-dev/pandas/pulls/41048 | 2021-04-20T02:11:16Z | 2021-04-20T13:12:04Z | 2021-04-20T13:12:04Z | 2021-04-20T16:02:00Z |
BUG: Slice Arrow buffer before passing it to numpy (#40896) | diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst
index 0e567972e7823..02d64e96e380b 100644
--- a/doc/source/whatsnew/v1.3.0.rst
+++ b/doc/source/whatsnew/v1.3.0.rst
@@ -796,6 +796,7 @@ I/O
- Bug in :func:`read_excel` dropping empty values from single-column spreadsheets (:issue:`39808`)
- ... | Add Arrow buffer slicing before handing it over to numpy which is
needed in case the Arrow buffer contains padding or offset.
- [x] closes #40896
- [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 h... | https://api.github.com/repos/pandas-dev/pandas/pulls/41046 | 2021-04-19T18:14:00Z | 2021-04-28T13:07:33Z | 2021-04-28T13:07:33Z | 2021-04-28T13:07:44Z |
PERF: implement get_slice in cython | diff --git a/pandas/_libs/internals.pyi b/pandas/_libs/internals.pyi
index a46a1747d1d8d..f3436e9c7afba 100644
--- a/pandas/_libs/internals.pyi
+++ b/pandas/_libs/internals.pyi
@@ -79,3 +79,5 @@ class BlockManager:
_blklocs: np.ndarray
def __init__(self, blocks: tuple[B, ...], axes: list[Index], verify_inte... | I'm seeing a 13-19% improvement in the motivating benchmark https://github.com/pandas-dev/pandas/pull/40171#issuecomment-790219422 | https://api.github.com/repos/pandas-dev/pandas/pulls/41045 | 2021-04-19T17:38:19Z | 2021-04-19T23:21:23Z | 2021-04-19T23:21:23Z | 2021-04-19T23:24:42Z |
WIP: BUG: fix Timestamp.normalize with nonexistent midnight on DST change | diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx
index 60ffa3dd46989..224868e256d29 100644
--- a/pandas/_libs/tslibs/timestamps.pyx
+++ b/pandas/_libs/tslibs/timestamps.pyx
@@ -536,7 +536,7 @@ cdef class _Timestamp(ABCTimestamp):
int64_t normalized
normalized ... | - [ ] closes #40517
- [ ] 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
Attempting an approach to fix this. Let's see if it works.
Not surprisingly, the brutef... | https://api.github.com/repos/pandas-dev/pandas/pulls/41043 | 2021-04-19T16:09:42Z | 2021-05-25T10:44:01Z | null | 2022-01-22T10:07:36Z |
ENH: option to export df to Stata dataset with value labels | diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst
index fee8334940a16..9166b28af4e78 100644
--- a/doc/source/whatsnew/v1.4.0.rst
+++ b/doc/source/whatsnew/v1.4.0.rst
@@ -101,6 +101,7 @@ Other enhancements
- :meth:`Series.ewm`, :meth:`DataFrame.ewm`, now support a ``method`` argument with a `... | GH38454
- [x] closes #38454
- [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/41042 | 2021-04-19T15:17:22Z | 2021-09-10T08:49:20Z | 2021-09-10T08:49:19Z | 2021-09-13T14:00:22Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.