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
POC: aggregate always aggregates
diff --git a/pandas/core/apply.py b/pandas/core/apply.py index c159abe55b38c..5112d8fd41c3d 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -674,7 +674,9 @@ def agg(self): result = result.T if result is not None else result if result is None: - result = self.obj.apply(...
- [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 Proof of concept to show what it would take for #35725 (needs tests, docs, and some comments cleaned up). I wanted to make sure the desired behavior has a viable...
https://api.github.com/repos/pandas-dev/pandas/pulls/40275
2021-03-06T16:49:35Z
2021-03-15T21:00:14Z
null
2021-10-19T03:45:51Z
TYP: remove ignore from MPLPlot._plot
diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 3b0d59501ba05..b355cba6354da 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -700,12 +700,8 @@ def _plot(cls, ax: Axes, x, y, style=None, is_errorbar: bool = False, **kwds): ...
xref #37715
https://api.github.com/repos/pandas-dev/pandas/pulls/40272
2021-03-06T14:37:47Z
2021-03-08T14:29:25Z
2021-03-08T14:29:25Z
2021-03-08T15:04:34Z
TYP: remove ignore from PandasObject.__sizeof__
diff --git a/pandas/core/base.py b/pandas/core/base.py index 86f5a7cae3693..c02f7bb2edf58 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -113,9 +113,9 @@ def __sizeof__(self) -> int: Generates the total memory usage for an object that returns either a value or Series of values ...
xref #37715 we should probably have a base implementation (or make memory_usage an abstract method). without doing this we have no way of enforcing that the method has a `deep` parameter. I am quite happy leaving the ignore in play to highlight this.
https://api.github.com/repos/pandas-dev/pandas/pulls/40271
2021-03-06T13:44:30Z
2021-03-08T14:29:00Z
2021-03-08T14:29:00Z
2021-03-08T15:06:35Z
TYP: remove ignore from makeCustomIndex
diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py index 4658aa7e3cfd4..b38ca516c4393 100644 --- a/pandas/_testing/__init__.py +++ b/pandas/_testing/__init__.py @@ -560,7 +560,7 @@ def makeCustomIndex( names = [names] # specific 1D index type requested? - idx_func = { + idx_fun...
xref #37715
https://api.github.com/repos/pandas-dev/pandas/pulls/40270
2021-03-06T12:45:01Z
2021-03-06T15:48:46Z
2021-03-06T15:48:46Z
2021-03-06T17:46:47Z
Add examples to documentation for DataFrame.swaplevel
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index de28c04ca0793..2260e74c17d42 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6471,6 +6471,57 @@ def swaplevel(self, i: Axis = -2, j: Axis = -1, axis: Axis = 0) -> DataFrame: Returns ------- DataFrame + + Ex...
- [x ] closes https://github.com/MarcoGorelli/pyladies-sprint-March-2021/issues/13 - [ ] 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/40269
2021-03-06T12:42:07Z
2021-03-12T14:10:16Z
2021-03-12T14:10:16Z
2021-03-15T13:58:21Z
TYP: add mypy messages as comments to ignores
diff --git a/pandas/conftest.py b/pandas/conftest.py index 07a20d9e0eb5c..688ad6dcc5e48 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -326,6 +326,7 @@ def frame_or_series(request): return request.param +# error: List item 0 has incompatible type "Type[Index]"; expected "Type[IndexOpsMixin]" @pyt...
xref #37715
https://api.github.com/repos/pandas-dev/pandas/pulls/40268
2021-03-06T12:31:59Z
2021-03-06T22:39:35Z
2021-03-06T22:39:35Z
2021-03-07T16:21:22Z
Remove pd_array from tests
diff --git a/pandas/tests/arithmetic/common.py b/pandas/tests/arithmetic/common.py index 386490623dc47..649ad562307c0 100644 --- a/pandas/tests/arithmetic/common.py +++ b/pandas/tests/arithmetic/common.py @@ -8,7 +8,7 @@ DataFrame, Index, Series, - array as pd_array, + array, ) import pandas._tes...
- [x] closes https://github.com/MarcoGorelli/pyladies-sprint-March-2021/issues/7 - [x] tests 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/40267
2021-03-06T12:09:24Z
2021-03-07T15:24:25Z
2021-03-07T15:24:25Z
2021-03-07T15:24:32Z
DOC: GH39672 Pandas dataframe pct_change function arguments
diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 140f456926763..e103f0e938a76 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10257,10 +10257,10 @@ def pct_change( GOOG 1769950 1500923 1371819 APPL 30586265 40912316 41403351 - >>> df.pct_change(...
- [x] closes #39672 - [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/40266
2021-03-06T12:06:11Z
2021-03-06T20:40:22Z
2021-03-06T20:40:22Z
2021-03-06T20:40:22Z
TYP: remove ignores for "Cannot assign to a method"
diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 140f456926763..ce32124d06f7e 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -10596,8 +10596,7 @@ def _add_numeric_operations(cls): def any(self, axis=0, bool_only=None, skipna=True, level=None, **kwargs): retur...
xref #37715 This is dynamic generated code. so I am also OK with leaving theses ignores in play to highlight this. these mypy errors could be interpreted as not being false positives.
https://api.github.com/repos/pandas-dev/pandas/pulls/40265
2021-03-06T11:18:55Z
2021-03-08T14:23:38Z
2021-03-08T14:23:37Z
2021-03-08T15:08:13Z
CI: numpy-dev PerformanceWarning
diff --git a/pandas/tests/extension/test_sparse.py b/pandas/tests/extension/test_sparse.py index a49e1b4a367fd..b8e042f0599f7 100644 --- a/pandas/tests/extension/test_sparse.py +++ b/pandas/tests/extension/test_sparse.py @@ -226,7 +226,8 @@ def test_fillna_no_op_returns_copy(self, data, request): request.n...
xref https://github.com/pandas-dev/pandas/pull/39953#issuecomment-791672194
https://api.github.com/repos/pandas-dev/pandas/pulls/40264
2021-03-06T09:32:30Z
2021-03-06T10:38:58Z
2021-03-06T10:38:58Z
2021-03-06T10:39:02Z
CLN: BlockManager.get_slice require only slice arg
diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index e3f342a024f6c..e3f9f6dbb0025 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -4551,6 +4551,13 @@ def __getitem__(self, key): else: return result + def _getitem_slice(self: _IndexT, slobj...
- [ ] 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 non-slice objects are currently getting past mypy. This ensures we only get slices, will o...
https://api.github.com/repos/pandas-dev/pandas/pulls/40262
2021-03-06T00:10:50Z
2021-03-10T13:53:31Z
2021-03-10T13:53:30Z
2021-03-10T14:46:58Z
CLN: Remove _axis from apply
diff --git a/pandas/core/apply.py b/pandas/core/apply.py index c159abe55b38c..cccd88ccb7a1e 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -166,19 +166,15 @@ def agg(self) -> Optional[FrameOrSeriesUnion]: args = self.args kwargs = self.kwargs - _axis = kwargs.pop("_axis", Non...
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them The regex `[\W]_axis` is showing this removes the only occurances of the variable `_axis` throughout all of `pandas.core`. It is only set in groupby in a branch ...
https://api.github.com/repos/pandas-dev/pandas/pulls/40261
2021-03-05T23:11:23Z
2021-03-08T14:31:43Z
2021-03-08T14:31:43Z
2021-10-19T03:45:50Z
Fixning-Doc-Typos
diff --git a/doc/source/user_guide/basics.rst b/doc/source/user_guide/basics.rst index 8d38c12252df4..d927ffc6718c4 100644 --- a/doc/source/user_guide/basics.rst +++ b/doc/source/user_guide/basics.rst @@ -181,14 +181,14 @@ These are both enabled to be used by default, you can control this by setting th Flexible binary...
Docs: changes the documentation Fix docs typos and small grammatical update
https://api.github.com/repos/pandas-dev/pandas/pulls/40260
2021-03-05T22:49:23Z
2021-03-06T11:37:37Z
null
2021-03-06T11:37:38Z
REF: simplify operating-columnwise dispatch
diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index d87df9d224bce..a273ecb2767c6 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -1,5 +1,6 @@ from __future__ import annotations +from functools import wraps import re from typing import ( TY...
After this we have one usage of split_and_operate left and 2 places where we can _almost_ use `@maybe_split`. In both cases I'm still trying to untangle things.
https://api.github.com/repos/pandas-dev/pandas/pulls/40256
2021-03-05T16:38:17Z
2021-03-16T16:59:52Z
2021-03-16T16:59:52Z
2021-03-16T17:03:19Z
PERF/CLN: restrict _isna_ndarraylike to actual ndarray/EA
diff --git a/pandas/core/dtypes/missing.py b/pandas/core/dtypes/missing.py index 642d35977ae36..b4a77337ce9f2 100644 --- a/pandas/core/dtypes/missing.py +++ b/pandas/core/dtypes/missing.py @@ -163,14 +163,22 @@ def _isna(obj, inf_as_na: bool = False): raise NotImplementedError("isna is not defined for MultiInd...
xref https://github.com/pandas-dev/pandas/issues/39146 I am looking at some `isna` related benchmarks, and noticing a lot of overhead related to checking of types. This makes `_isna_ndarraylike` stricter to only handle ndarray and EA, and not Series/Index (and therefore also renamed it to `_isna_array`). Reproduc...
https://api.github.com/repos/pandas-dev/pandas/pulls/40254
2021-03-05T14:01:33Z
2021-03-05T16:36:46Z
2021-03-05T16:36:46Z
2021-03-05T16:36:50Z
Backport PR #40233 on branch 1.2.x (DEPS: skip html tests if html5lib is not installed #40198)
diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index aed1aaedf2fa3..aedb87eb44797 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -66,6 +66,7 @@ def assert_framelist_equal(list1, list2, *args, **kwargs): @td.skip_if_no("bs4") +@td.skip_if_no("html5lib") de...
Backport PR #40233: DEPS: skip html tests if html5lib is not installed #40198
https://api.github.com/repos/pandas-dev/pandas/pulls/40253
2021-03-05T13:57:59Z
2021-03-05T15:53:07Z
2021-03-05T15:53:07Z
2021-03-05T15:53:07Z
[ArrayManager] Fix window operations with axis=1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59c3fc8f05105..6c60522092739 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,3 +192,4 @@ jobs: pytest pandas/tests/tseries/ pytest pandas/tests/tslibs/ pytest pandas/tests/util/ + pytest...
xref https://github.com/pandas-dev/pandas/issues/39146 With this PR, all `pandas/tests/window/` tests are passing. It was basically only the `axis=1` case that was not working (since you can't do that column-wise)
https://api.github.com/repos/pandas-dev/pandas/pulls/40251
2021-03-05T11:13:03Z
2021-03-05T13:28:56Z
2021-03-05T13:28:56Z
2021-03-05T13:31:09Z
PERF: avoid validating indices repeatedly in ArrayManager.reindex_indexer
diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py index 0449be84bdcf7..d7f1077ce7968 100644 --- a/pandas/core/internals/array_manager.py +++ b/pandas/core/internals/array_manager.py @@ -73,7 +73,10 @@ extract_array, sanitize_array, ) -from pandas.core.indexers impor...
xref https://github.com/pandas-dev/pandas/issues/39146 In `ArrayManager.reindex_indexer`, we are currently using `take`, which validates the indices each time. Since we know we have the same indices for each column, we can validate them once, and use the lower level `take_nd`. From the `frame_methods.py::Reindex`...
https://api.github.com/repos/pandas-dev/pandas/pulls/40248
2021-03-05T09:14:58Z
2021-03-05T13:16:18Z
2021-03-05T13:16:18Z
2021-03-05T13:21:07Z
BENCH: add DataFrame.reindex(columns=..) benchmark that selects existing columns
diff --git a/asv_bench/benchmarks/frame_methods.py b/asv_bench/benchmarks/frame_methods.py index bd068cec4641b..bcdd9c6fa5717 100644 --- a/asv_bench/benchmarks/frame_methods.py +++ b/asv_bench/benchmarks/frame_methods.py @@ -52,6 +52,7 @@ def setup(self): N = 10 ** 3 self.df = DataFrame(np.random.rand...
I noticed that the current `df.reindex(columns=idx)` benchmark uses an indexer with all-non-existing indices (it uses `range(4000, 7000)` as indexer, but there are only 1000 columns), so basically it is benchmarking to create empty (all-NaN) columns. Therefore added a case of reindexing with an indexer consisting of ex...
https://api.github.com/repos/pandas-dev/pandas/pulls/40247
2021-03-05T09:01:39Z
2021-03-05T13:16:36Z
2021-03-05T13:16:35Z
2021-03-05T13:21:13Z
PERF: specialized 1D take version
diff --git a/pandas/core/array_algos/take.py b/pandas/core/array_algos/take.py index 2179085d9ad9b..054497089c5ab 100644 --- a/pandas/core/array_algos/take.py +++ b/pandas/core/array_algos/take.py @@ -121,6 +121,43 @@ def _take_nd_ndarray( return out +def take_1d( + arr: ArrayLike, + indexer: np.ndarray,...
A part that I took out of https://github.com/pandas-dev/pandas/pull/39692, doing it separately here. This gives a bit of code duplication (but all large parts of the function were already factored out into shared helper functions before, like `_take_preprocess_indexer_and_fill_value`), but having a 1D version gives...
https://api.github.com/repos/pandas-dev/pandas/pulls/40246
2021-03-05T08:43:15Z
2021-03-05T21:34:21Z
2021-03-05T21:34:20Z
2021-03-08T22:20:37Z
[WIP] ENH:`Styler.highlight_quantile` method
diff --git a/asv_bench/benchmarks/io/style.py b/asv_bench/benchmarks/io/style.py index 6c0ca6fac6ec3..4fc07bbabda06 100644 --- a/asv_bench/benchmarks/io/style.py +++ b/asv_bench/benchmarks/io/style.py @@ -3,7 +3,7 @@ from pandas import DataFrame -class Render: +class RenderApply: params = [[12, 24, 36], [12...
will update.
https://api.github.com/repos/pandas-dev/pandas/pulls/40244
2021-03-05T08:16:17Z
2021-04-13T15:25:49Z
null
2021-04-13T15:26:48Z
ENH: consistent `Styler.highlight_X` arg signature with `props`
diff --git a/doc/source/reference/style.rst b/doc/source/reference/style.rst index 3a8d912fa6ffe..9dcdcb86c2ea4 100644 --- a/doc/source/reference/style.rst +++ b/doc/source/reference/style.rst @@ -53,9 +53,9 @@ Builtin styles .. autosummary:: :toctree: api/ + Styler.highlight_null Styler.highlight_max ...
This splits #39821 into separate PRs. The `See Also` doc strings here reference methods created in those PRs - if we push this through now I will fix it later if those methods don't get approved before 1.3.0. The tests that were edited contained redundant code and were not testing.
https://api.github.com/repos/pandas-dev/pandas/pulls/40242
2021-03-05T07:21:09Z
2021-03-05T21:34:47Z
2021-03-05T21:34:47Z
2021-03-30T05:05:53Z
ENH: allow start=range_object in RangeIndex constructor
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 370ea28832758..bc792713b5879 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -140,6 +140,7 @@ Other enhancements - :meth:`pandas.read_stata` and :class:`StataReader` support reading data from compress...
- [x] closes #12067 - [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 simplifies `Index.__new__` a bit
https://api.github.com/repos/pandas-dev/pandas/pulls/40241
2021-03-05T03:36:10Z
2021-03-09T17:05:04Z
2021-03-09T17:05:04Z
2021-03-09T17:25:18Z
CLN: Remove to_xml from format.py to run directly in frame.py
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 16d6071585a29..70111f3bc9a2c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2820,12 +2820,31 @@ def to_xml( </doc:data> """ - formatter = fmt.DataFrameFormatter( - self, - index=index, + ...
- [X] refereces #40131 - [X] tests 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 necessary)
https://api.github.com/repos/pandas-dev/pandas/pulls/40240
2021-03-05T02:48:50Z
2021-03-05T14:02:23Z
2021-03-05T14:02:23Z
2021-03-07T13:32:44Z
PERF: enable nullable integer for read_sql via parameter
diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index 4e04425436af4..53fe3f6066cba 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -2259,7 +2259,7 @@ def maybe_convert_objects(ndarray[object] objects, bint try_float=False, seen.int_ = True floats[i] = <float64_t>val ...
Function `pandas.read_sql` read SQL query or database table into a DataFrame. However, for nullable integer columns, once there exists one row with null, pandas will infer this column as float, which may lead to subsequent issues (in our case, we use DataFrame for ETL and the integer converted to float, not suitable fo...
https://api.github.com/repos/pandas-dev/pandas/pulls/40239
2021-03-05T02:27:02Z
2021-06-08T18:48:39Z
null
2021-06-08T18:48:39Z
DEPR: Partial failure in Series.transform and DataFrame.transform
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 477805b09afff..36e2b6a07eb71 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -363,6 +363,7 @@ Deprecations - Deprecated :meth:`core.window.ewm.ExponentialMovingWindow.vol` (:issue:`39220`) - Using ``...
- [x] closes #40211 - [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 In test_frame_transform.test_transform_partial_failure, two of the tests did not actually ...
https://api.github.com/repos/pandas-dev/pandas/pulls/40238
2021-03-05T01:29:50Z
2021-03-05T13:17:01Z
2021-03-05T13:17:01Z
2021-04-24T12:37:44Z
Backport PR #40143 on branch 1.2.x (REGR: reduction operations failing if `min_count` is larger)
diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst index 790ff4c78cad6..edf23bf89d7e1 100644 --- a/doc/source/whatsnew/v1.2.4.rst +++ b/doc/source/whatsnew/v1.2.4.rst @@ -15,7 +15,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ -- +- Fixed regression in :meth:`...
Backport PR #40143: REGR: reduction operations failing if `min_count` is larger
https://api.github.com/repos/pandas-dev/pandas/pulls/40237
2021-03-05T01:11:14Z
2021-03-05T17:59:14Z
2021-03-05T17:59:14Z
2021-03-05T17:59:14Z
PERF: non-cython groupby.apply
diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 5bba7ab67b2bf..7f16b7c2513fb 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -276,6 +276,22 @@ def _init_mgr( mgr = mgr.astype(dtype=dtype) return mgr + @classmethod + def _from_mgr(cls, mgr: Manager...
xref https://github.com/pandas-dev/pandas/pull/40171#issuecomment-790219422 when disabling fast_apply, this cuts the linked benchmark by 13-15% xref #40227 which also gets 13% Potential pitfall if _constructor is particularly wonky.
https://api.github.com/repos/pandas-dev/pandas/pulls/40236
2021-03-05T00:27:15Z
2021-03-05T14:22:48Z
2021-03-05T14:22:48Z
2021-03-05T15:02:03Z
DEPS: skip html tests if html5lib is not installed #40198
diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 9f1df201ee0e6..f842e4cd58863 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -69,6 +69,7 @@ def assert_framelist_equal(list1, list2, *args, **kwargs): @td.skip_if_no("bs4") +@td.skip_if_no("html5lib") de...
- [x] closes #40198
https://api.github.com/repos/pandas-dev/pandas/pulls/40233
2021-03-04T20:44:21Z
2021-03-05T13:55:58Z
2021-03-05T13:55:57Z
2021-03-18T16:44:53Z
CI autofix_prs: false for pre-commit.ci
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa5bc10f979ed..9424b2f34eaff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,7 @@ minimum_pre_commit_version: 2.9.2 exclude: ^LICENSES/|\.(html|csv|svg)$ +ci: + autofix_prs: false repos: - repo: https://github.co...
Somehow, this autoupdate job doesn't trigger all the workflows. I don't know why, because [the same workflow in PyMC3](https://github.com/pymc-devs/pymc3/pull/4466) works just fine. From [this action's README](https://github.com/technote-space/create-pr-action), all the actions have commit email and commit name set ...
https://api.github.com/repos/pandas-dev/pandas/pulls/40232
2021-03-04T20:12:46Z
2021-04-13T12:31:46Z
2021-04-13T12:31:45Z
2021-04-13T19:35:04Z
ENH: Add if_sheet_exists parameter to ExcelWriter
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 8af129cec2490..494a5d527c6b3 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -196,6 +196,7 @@ Other enhancements - :func:`to_numeric` now supports downcasting of nullable ``ExtensionDtype`` objects (:...
- [x] closes #40230 - [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/40231
2021-03-04T19:18:52Z
2021-04-22T01:05:47Z
2021-04-22T01:05:47Z
2021-04-22T01:05:48Z
Check the that SQLAlchemy ResultProxy returns rows before fetching rows
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index f7204ceb9d412..6a6fa0a23b4d0 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -488,6 +488,7 @@ I/O - :meth:`read_sql` returned an empty generator if ``chunksize`` was no-zero and the query returned no ...
- [X] closes #40205 - [ ] 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/40229
2021-03-04T18:15:16Z
2021-04-30T00:56:57Z
null
2021-04-30T00:56:58Z
Check the that SQLAlchemy ResultProxy returns rows before fetching rows
diff --git a/pandas/io/sql.py b/pandas/io/sql.py index c028e1f5c5dbe..de0744581f987 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -1476,7 +1476,7 @@ def read_query( parse_dates=parse_dates, dtype=dtype, ) - else: + elif result.returns_rows: ...
- [X] closes #40205 - [ ] 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/40228
2021-03-04T18:09:58Z
2021-03-04T18:14:27Z
null
2021-03-04T18:14:28Z
PERF: BlockPlacement construction
diff --git a/pandas/_libs/internals.pyx b/pandas/_libs/internals.pyx index 150b7f62b4b26..9b2db897cdd32 100644 --- a/pandas/_libs/internals.pyx +++ b/pandas/_libs/internals.pyx @@ -15,11 +15,13 @@ cimport numpy as cnp from numpy cimport ( NPY_INT64, int64_t, + ndarray, ) cnp.import_array() from pan...
xref https://github.com/pandas-dev/pandas/pull/40171#issuecomment-790219422 when disabling fast_apply, this cuts the linked benchmark by 13%
https://api.github.com/repos/pandas-dev/pandas/pulls/40227
2021-03-04T18:00:54Z
2021-03-06T03:01:22Z
2021-03-06T03:01:22Z
2021-03-06T03:05:06Z
CLN: Minor cleanup of caching
diff --git a/pandas/core/base.py b/pandas/core/base.py index 9b2efeff76926..86f5a7cae3693 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -80,6 +80,7 @@ class PandasObject(DirNamesMixin): Baseclass for various pandas objects. """ + # results from calls to methods decorated with cache_readon...
Minor cleanup.
https://api.github.com/repos/pandas-dev/pandas/pulls/40225
2021-03-04T17:18:52Z
2021-03-05T00:51:16Z
2021-03-05T00:51:16Z
2021-03-05T07:16:16Z
STYLE: Inconsistent namespace - arithmetic (#39992)
diff --git a/pandas/tests/arithmetic/test_datetime64.py b/pandas/tests/arithmetic/test_datetime64.py index f28407df24508..f75b3800f623f 100644 --- a/pandas/tests/arithmetic/test_datetime64.py +++ b/pandas/tests/arithmetic/test_datetime64.py @@ -151,7 +151,7 @@ def test_dt64arr_nat_comparison(self, tz_naive_fixture, box...
- [x] xref #39992 - [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/40224
2021-03-04T16:52:28Z
2021-03-04T23:56:25Z
2021-03-04T23:56:25Z
2021-03-05T08:55:41Z
STYLE: Inconsistent namespace - api
diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index fd1c19219c4bf..11bb554a0dc5a 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -236,9 +236,9 @@ def test_datetime(): with warnings.catch_warnings(): warnings.simplefilter("ignore", FutureWarning)...
- [x] xref #39992 - [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/40223
2021-03-04T14:50:32Z
2021-03-04T16:23:31Z
2021-03-04T16:23:31Z
2021-03-04T16:53:46Z
TST: use env variable instead of pytest option for testing ArrayManager
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c03722e32fea9..06a06484b921a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,23 +150,25 @@ jobs: uses: ./.github/actions/setup - name: Run tests + env: + PANDAS_DATA_MANAGER: array run: |...
I noticed a problem with the current `--array-manager` pytest option to test the ArrayManager, while checking the window tests. The problem with the option is that `conftest.py` files are read first, *before* handling the option in `pytest_sessionstart`. This means that any DataFrame or Series that gets constructed...
https://api.github.com/repos/pandas-dev/pandas/pulls/40222
2021-03-04T12:35:21Z
2021-03-04T15:28:00Z
2021-03-04T15:28:00Z
2021-03-04T15:28:47Z
STYLE: Inconsistent namespace - arrays #39992
diff --git a/pandas/tests/arrays/categorical/test_missing.py b/pandas/tests/arrays/categorical/test_missing.py index 0a35f490ff210..e73535319d14e 100644 --- a/pandas/tests/arrays/categorical/test_missing.py +++ b/pandas/tests/arrays/categorical/test_missing.py @@ -154,14 +154,14 @@ def test_use_inf_as_na_outside_contex...
- [ ] closes #xxxx - [ ] 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/40221
2021-03-04T09:24:29Z
2021-03-04T11:24:29Z
2021-03-04T11:24:29Z
2021-03-04T13:02:59Z
STYLE: Inconsistent namespace - resample #39992
diff --git a/pandas/tests/resample/test_datetime_index.py b/pandas/tests/resample/test_datetime_index.py index cbf69696d5801..ea8b8fc7aa6a2 100644 --- a/pandas/tests/resample/test_datetime_index.py +++ b/pandas/tests/resample/test_datetime_index.py @@ -125,12 +125,12 @@ def test_resample_basic(series, closed, expected)...
- [ ] closes #xxxx - [ ] 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/40220
2021-03-04T09:09:03Z
2021-03-04T11:26:11Z
2021-03-04T11:26:11Z
2021-03-04T13:02:59Z
BUG: update should try harder to preserve dtypes #4094
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 5c61f259a4202..d248131bd1c76 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -406,7 +406,7 @@ Conversion - Bug in :meth:`Series.view` and :meth:`Index.view` when converting between datetime-like (``da...
- [ ] closes #4094 - [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 have to admit, I am not quite sure about the code in the [initial example](https://github...
https://api.github.com/repos/pandas-dev/pandas/pulls/40219
2021-03-04T09:03:28Z
2021-05-25T12:05:23Z
null
2021-08-05T01:44:59Z
STYLE: Inconsistent namespace - scalar #39992
diff --git a/pandas/tests/scalar/test_na_scalar.py b/pandas/tests/scalar/test_na_scalar.py index 5c4d7e191d1bb..77265e8745315 100644 --- a/pandas/tests/scalar/test_na_scalar.py +++ b/pandas/tests/scalar/test_na_scalar.py @@ -100,7 +100,7 @@ def test_comparison_ops(): def test_pow_special(value, asarray): if asarr...
- [ ] closes #xxxx - [ ] 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/40218
2021-03-04T09:02:54Z
2021-03-04T12:02:18Z
2021-03-04T12:02:17Z
2021-03-04T13:06:40Z
[ArrayManager] TST: activate a bunch of (passing) tests
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ae70e6e9ca10..59c3fc8f05105 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,3 +176,19 @@ jobs: pytest pandas/tests/frame/indexing/test_setitem.py::TestDataFrameSetItem::test_setitem_listlike_indexer_duplicate_c...
xref https://github.com/pandas-dev/pandas/issues/39146/ This is on top of #40152, so only the second commit is relevant: https://github.com/pandas-dev/pandas/pull/40217/commits/e7209aaa7b85c206d3efcd446eaa54b34851cb98 But this basically adds the following to CI for ArrayManager: ``` pytest pandas/test...
https://api.github.com/repos/pandas-dev/pandas/pulls/40217
2021-03-04T08:40:20Z
2021-03-05T08:29:58Z
2021-03-05T08:29:57Z
2021-03-05T08:31:11Z
TST: remove some no longer necessary ArrayManager skips for groupby
diff --git a/pandas/tests/frame/methods/test_count.py b/pandas/tests/frame/methods/test_count.py index 1dbcc36c83abc..4533e46a7aabd 100644 --- a/pandas/tests/frame/methods/test_count.py +++ b/pandas/tests/frame/methods/test_count.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import pandas.util._test_decorato...
After the recent groupby PRs, those skips are no longer needed
https://api.github.com/repos/pandas-dev/pandas/pulls/40216
2021-03-04T07:41:56Z
2021-03-04T11:57:21Z
2021-03-04T11:57:21Z
2021-03-04T11:57:24Z
BUG: read_excel skips single-column empty rows
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index fb8eecdaa275e..be3fce6f8c5d0 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -533,6 +533,7 @@ I/O - :meth:`read_sql` returned an empty generator if ``chunksize`` was no-zero and the query returned no ...
Ref #39808 - [x] tests added / passed - [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them - [x] whatsnew entry This is the fix proposed in the discussion of #40095
https://api.github.com/repos/pandas-dev/pandas/pulls/40214
2021-03-04T04:02:14Z
2021-03-09T23:45:23Z
2021-03-09T23:45:22Z
2021-03-09T23:55:22Z
TST/CLN: Move raising apply tests to test_invalid_arg
diff --git a/pandas/tests/apply/test_frame_apply.py b/pandas/tests/apply/test_frame_apply.py index 12c803cbebaf3..8cebe1a888b77 100644 --- a/pandas/tests/apply/test_frame_apply.py +++ b/pandas/tests/apply/test_frame_apply.py @@ -37,12 +37,6 @@ def test_apply(float_frame): assert result[d] == expected ...
- [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/40213
2021-03-04T02:15:36Z
2021-03-04T14:23:11Z
2021-03-04T14:23:11Z
2021-03-05T00:51:08Z
CI: remove xfail in grouopby #40144
diff --git a/pandas/tests/extension/base/groupby.py b/pandas/tests/extension/base/groupby.py index d93afef60561a..30b115b9dba6f 100644 --- a/pandas/tests/extension/base/groupby.py +++ b/pandas/tests/extension/base/groupby.py @@ -1,7 +1,5 @@ import pytest -from pandas.compat.numpy import is_numpy_dev - import pandas...
- [x] closes #40144
https://api.github.com/repos/pandas-dev/pandas/pulls/40212
2021-03-04T01:22:44Z
2021-03-04T03:22:13Z
2021-03-04T03:22:13Z
2021-03-18T16:39:16Z
BUG: constructing DTA/TDA from xarray/dask/pandasarray
diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index ce0ea7bca55cd..e163cd1cb8e06 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -59,17 +59,18 @@ pandas_dtype, ) from pandas.core.dtypes.dtypes import DatetimeTZDtype -from pandas.core.dtypes.g...
- [x] closes #24539 - [x] closes #24615 - [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/40210
2021-03-03T23:35:38Z
2021-03-16T15:36:30Z
2021-03-16T15:36:30Z
2021-03-16T16:45:51Z
REF: tighten signature on maybe_convert_platform
diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index 43c3a5e8bfd4c..f192a34514390 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -53,10 +53,10 @@ ) from pandas.core.dtypes.dtypes import IntervalDtype from pandas.core.dtypes.generic import ( + ABCD...
- [ ] 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/40209
2021-03-03T22:50:35Z
2021-03-05T01:29:46Z
2021-03-05T01:29:46Z
2021-03-05T01:37:37Z
DOC: Fix Examples section for some window methods
diff --git a/pandas/core/window/doc.py b/pandas/core/window/doc.py index 7e3f7895c0125..df69553a74683 100644 --- a/pandas/core/window/doc.py +++ b/pandas/core/window/doc.py @@ -95,7 +95,7 @@ def create_section_header(header: str) -> str: numba_notes = ( "See :ref:`window.numba_engine` for extended documentation...
Some of the example sections were not rendering correctly after a doc refactor I did a while back: https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.core.window.rolling.Rolling.mean.html
https://api.github.com/repos/pandas-dev/pandas/pulls/40208
2021-03-03T20:47:46Z
2021-03-05T01:34:07Z
2021-03-05T01:34:06Z
2021-03-05T06:36:30Z
DOC: Add Notes and Examples back to GroupBy.apply docs template
diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index d8135dbf3f08d..e11c296783476 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -153,11 +153,23 @@ class providing the base-class of operations. transform : Apply function column-by-column to the Gro...
- [X] xref #37875 (see https://github.com/pandas-dev/pandas/issues/37875#issuecomment-790026815) - [ ] tests added / passed (n/a) - [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 (n/a)
https://api.github.com/repos/pandas-dev/pandas/pulls/40207
2021-03-03T20:38:26Z
2021-03-04T01:35:00Z
2021-03-04T01:35:00Z
2021-03-04T16:45:58Z
DOC: Update read_hdf's acceptable path types
diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 88b444acfea62..25cabbb7c61b9 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -348,19 +348,15 @@ def read_hdf( Parameters ---------- - path_or_buf : str, path object, pandas.HDFStore or file-like object - Any valid s...
The docstring for `read_hdf` claims it can read from URLs and file-like objects. Neither of these are supported by the underlying `PyTables` library. - [ ] closes #xxxx - [ ] tests added / passed - [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html...
https://api.github.com/repos/pandas-dev/pandas/pulls/40206
2021-03-03T19:51:54Z
2021-03-04T01:45:13Z
2021-03-04T01:45:13Z
2021-03-04T01:45:23Z
REF: get reshape kludge out of dtypes.cast
diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 9f111282473c2..b30751fcefe81 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1529,16 +1529,10 @@ def try_datetime(v: np.ndarray) -> ArrayLike: # e.g. <class 'numpy.timedelta64'> is not convertible to dat...
https://api.github.com/repos/pandas-dev/pandas/pulls/40203
2021-03-03T18:30:32Z
2021-03-04T01:29:36Z
2021-03-04T01:29:36Z
2021-03-04T01:49:28Z
TST/TYP: start testing public api types
diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 251f450840ea9..9467e285cca62 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -114,7 +114,7 @@ if [[ -z "$CHECK" || "$CHECK" == "patterns" ]]; then MSG='Check for use of {foo!r} instead of {repr(foo)}' ; echo $MSG invgrep -R --include=*.{py,pyx...
There has been some discussion in the recent developer meetings regarding the testing of types. This PR uses the a method of testing used (maybe developed?) by numpy. IMO this is most useful for testing overloads, but could be extended to the complete public api.
https://api.github.com/repos/pandas-dev/pandas/pulls/40202
2021-03-03T16:34:30Z
2021-03-21T15:06:00Z
null
2022-01-08T14:13:17Z
TYP fixup overloads for reset_index
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 64759dcf07d8b..a0c97b0cdd268 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -5145,9 +5145,7 @@ def set_index( return frame @overload - # https://github.com/python/mypy/issues/6580 - # Overloaded function signatures...
- [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 Took me longer than I'm proud to admit, but I think I've finally understood the deal with overload and default types. We need one overload for the default cas...
https://api.github.com/repos/pandas-dev/pandas/pulls/40200
2021-03-03T16:08:47Z
2021-03-10T11:26:26Z
2021-03-10T11:26:26Z
2021-04-05T21:25:14Z
REF: remove block access in groupby libreduction Series(Bin)Grouper
diff --git a/pandas/_libs/reduction.pyx b/pandas/_libs/reduction.pyx index 4d0bd4744be5d..5649d1378cda3 100644 --- a/pandas/_libs/reduction.pyx +++ b/pandas/_libs/reduction.pyx @@ -66,9 +66,7 @@ cdef class _BaseGrouper: object.__setattr__(cached_ityp, '_index_data', islider.buf) cached_ityp._e...
xref https://github.com/pandas-dev/pandas/issues/39146 The `Series(Bin)Grouper` still has some direct block access, which needs to be resolved to let it work for both Block and ArrayManager
https://api.github.com/repos/pandas-dev/pandas/pulls/40199
2021-03-03T13:50:05Z
2021-03-04T16:45:10Z
2021-03-04T16:45:10Z
2021-03-04T16:45:14Z
TYP: use overload to refine return type of set_axis
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 23c61773daf5a..260ff67742e97 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4541,6 +4541,26 @@ def align( broadcast_axis=broadcast_axis, ) + @overload + def set_axis( + self, labels, axis: Axis = ..., i...
Trying to use overload so that mypy knows that the return type of `.set_axis` is depending on the value of `inplace`. This seems to work - if I have ```python # t.py import pandas as pd reveal_type(pd.DataFrame([1,2,3]).set_axis([2,3,4], axis=0, inplace=True)) reveal_type(pd.DataFrame([1,2,3]).set_axis([2,3...
https://api.github.com/repos/pandas-dev/pandas/pulls/40197
2021-03-03T11:06:38Z
2021-03-14T15:47:50Z
2021-03-14T15:47:50Z
2021-04-01T18:53:55Z
[ArrayManager] ENH: ArrayManager.convert without block fallback
diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py index 998f1ffcf02ee..97d8c11bb5473 100644 --- a/pandas/core/internals/array_manager.py +++ b/pandas/core/internals/array_manager.py @@ -31,6 +31,7 @@ astype_array_safe, find_common_type, infer_dtype_from_scalar, ...
xref https://github.com/pandas-dev/pandas/issues/39146
https://api.github.com/repos/pandas-dev/pandas/pulls/40196
2021-03-03T09:21:25Z
2021-03-05T01:31:48Z
2021-03-05T01:31:48Z
2021-03-05T07:48:00Z
PERF: avoid zeros_like in groupby.pyx
diff --git a/pandas/_libs/groupby.pyx b/pandas/_libs/groupby.pyx index 43bf6d9dd1fee..40e82798c0753 100644 --- a/pandas/_libs/groupby.pyx +++ b/pandas/_libs/groupby.pyx @@ -497,8 +497,9 @@ def _group_add(complexfloating_t[:, :] out, raise ValueError("len(index) != len(labels)") nobs = np.zeros((<object>...
Apparently calling `np.zeros_like` has quite some overhead: ``` In [7]: arr = np.random.randn(1000) In [8]: %timeit np.zeros_like(arr) 3.14 µs ± 44.2 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) In [9]: %timeit np.zeros(arr.shape, dtype=arr.dtype) 662 ns ± 41.9 ns per loop (mean ± std. dev. o...
https://api.github.com/repos/pandas-dev/pandas/pulls/40194
2021-03-03T08:55:27Z
2021-03-03T13:04:51Z
2021-03-03T13:04:51Z
2021-03-03T14:59:49Z
PERF: Cache hashing of categories
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 3a0e1b7568c91..e0bcd805bc30c 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -567,6 +567,7 @@ Performance improvements - Performance improvement in :class:`Styler` where render times are more than 50%...
Hashing of the dtype is used in numerous places of the code base. For example it is used in concat operations to determine whether all objects have the same dtype. For `CategoricalDtype` this operation can be extremely costly since it requires hashing the array/list of categories. The following example shows the imp...
https://api.github.com/repos/pandas-dev/pandas/pulls/40193
2021-03-03T08:34:37Z
2021-04-12T12:35:35Z
2021-04-12T12:35:35Z
2021-04-12T14:14:52Z
REF: re-use sequence_to_datetimes in try_datetime
diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 1b0a045dca180..ce0ea7bca55cd 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1905,13 +1905,16 @@ def std( def sequence_to_datetimes( - data, allow_object: bool = False + data, allow_obj...
- [ ] 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 if it weren't for the [expletive deleted] 1D/2D kludges, try_datetime would be down to 3 li...
https://api.github.com/repos/pandas-dev/pandas/pulls/40191
2021-03-03T05:06:01Z
2021-03-03T13:09:22Z
2021-03-03T13:09:22Z
2021-03-03T15:15:40Z
REF: move dtype-validation out of maybe_cast_to_datetime
diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index f5ec6616659ba..92b8ce60dec60 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -38,7 +38,6 @@ Timedelta, Timestamp, conversion, - iNaT, ints_to_pydatetime, ) from pandas._libs.tslibs.timedeltas ...
- [ ] 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/40190
2021-03-03T05:00:43Z
2021-03-03T13:08:39Z
2021-03-03T13:08:39Z
2021-03-03T15:22:17Z
ENH: ArrayManager.quantile
diff --git a/pandas/core/array_algos/quantile.py b/pandas/core/array_algos/quantile.py index 8d4dd7be28839..802fc4db0a36d 100644 --- a/pandas/core/array_algos/quantile.py +++ b/pandas/core/array_algos/quantile.py @@ -1,11 +1,50 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + import numpy a...
xref https://github.com/pandas-dev/pandas/issues/39146
https://api.github.com/repos/pandas-dev/pandas/pulls/40189
2021-03-03T02:50:41Z
2021-03-05T04:28:15Z
2021-03-05T04:28:15Z
2021-03-05T04:30:44Z
CI: xfail npdev test_groupby_apply_identity
diff --git a/pandas/tests/extension/base/groupby.py b/pandas/tests/extension/base/groupby.py index 30b115b9dba6f..d93afef60561a 100644 --- a/pandas/tests/extension/base/groupby.py +++ b/pandas/tests/extension/base/groupby.py @@ -1,5 +1,7 @@ import pytest +from pandas.compat.numpy import is_numpy_dev + import pandas...
xref #40144
https://api.github.com/repos/pandas-dev/pandas/pulls/40188
2021-03-02T23:49:38Z
2021-03-03T04:04:49Z
2021-03-03T04:04:49Z
2021-03-03T04:29:22Z
REF: move mixed-int handling from maybe_cast_to_datetime
diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index e28a1a2326d17..1b0a045dca180 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -1904,6 +1904,23 @@ def std( # Constructor Helpers +def sequence_to_datetimes( + data, allow_object: bool = Fals...
- [ ] 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 ideally we'll end up with only one place in the non-cython code calling into the array_to_d...
https://api.github.com/repos/pandas-dev/pandas/pulls/40187
2021-03-02T23:36:36Z
2021-03-03T03:05:30Z
2021-03-03T03:05:29Z
2021-03-03T03:26:45Z
REF: split out to_datetime_with_unit, _to_datetime_with_format
diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 279f4bd056ed8..d58b5e5ffa83d 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -346,38 +346,7 @@ def _convert_listlike_datetimes( elif unit is not None: if format is not None: ...
The idea is that to_datetime_with_format will eventually be moved into objects_to_datetime64ns, and most of _convert_listlike_datetimes will just be a call to sequence_to_dt64ns
https://api.github.com/repos/pandas-dev/pandas/pulls/40185
2021-03-02T21:52:02Z
2021-03-03T13:07:39Z
2021-03-03T13:07:39Z
2021-03-03T15:23:55Z
API: pseudo-public internals API for downstream libraries
diff --git a/pandas/core/internals/__init__.py b/pandas/core/internals/__init__.py index 23d35b412e1ae..ea9f9abc4a4c7 100644 --- a/pandas/core/internals/__init__.py +++ b/pandas/core/internals/__init__.py @@ -1,3 +1,4 @@ +from pandas.core.internals.api import make_block # pseudo-public version from pandas.core.intern...
Downstream libraries accessing core.internals causes headaches pretty regularly (https://github.com/pandas-dev/pandas/pull/40149#discussion_r585699450, #38134,). The proposal: define a public-ish stable-ish API to expose for these libraries, leaving us free-er to make changes in internals. This exposes `make_block...
https://api.github.com/repos/pandas-dev/pandas/pulls/40182
2021-03-02T20:45:58Z
2021-03-05T13:55:04Z
2021-03-05T13:55:03Z
2021-03-05T15:03:46Z
CLN: Refactor tests and delete duplicates
diff --git a/pandas/conftest.py b/pandas/conftest.py index 426cbf6a65aa5..5126750dc263d 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -1598,6 +1598,14 @@ def indexer_sl(request): return request.param +@pytest.fixture(params=[tm.at, tm.loc]) +def indexer_al(request): + """ + Parametrize over...
- [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 Deleted a few duplicates and parametrized
https://api.github.com/repos/pandas-dev/pandas/pulls/40181
2021-03-02T20:36:54Z
2021-03-04T18:09:41Z
2021-03-04T18:09:41Z
2021-03-04T21:56:07Z
Make Index.all compatible with numpy.all
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index f7204ceb9d412..7a23fb801a29a 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -539,6 +539,8 @@ Reshaping - Bug in :meth:`DataFrame.append` returning incorrect dtypes with combinations of ``ExtensionDty...
- [ ] 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 Due to a bug in my own code, I discovered that `pandas.Index` objects cannot be passed to t...
https://api.github.com/repos/pandas-dev/pandas/pulls/40180
2021-03-02T20:15:00Z
2021-03-05T01:28:49Z
2021-03-05T01:28:49Z
2021-03-05T01:28:55Z
PERF: cache _get_cython_function in groupby ops
diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py index 05d75bdda5131..cc623766f58f0 100644 --- a/pandas/core/groupby/ops.py +++ b/pandas/core/groupby/ops.py @@ -8,6 +8,7 @@ from __future__ import annotations import collections +import functools from typing import ( Dict, Generic, @@ -...
Looking up the exact cython function is relatively costly, and is also something that is done repeatedly for a limited number of possible cases, so a good target for caching. Using the `GroupManyLabels` benchmark we have: https://github.com/pandas-dev/pandas/blob/b835ca2fc2f772c27c914ae532cd32f8db69724a/asv_benc...
https://api.github.com/repos/pandas-dev/pandas/pulls/40178
2021-03-02T20:03:53Z
2021-03-03T08:38:05Z
2021-03-03T08:38:05Z
2021-03-03T08:38:09Z
BUG: more specific .drop() message when keys not found
diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 30190ef950af5..e36515cf00d96 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -5866,7 +5866,7 @@ def drop(self: _IndexT, labels, errors: str_t = "raise") -> _IndexT: mask = indexer == -1 if mask.a...
Changed "not found in axis" to "not found in columns" - [x] closes #40160
https://api.github.com/repos/pandas-dev/pandas/pulls/40177
2021-03-02T19:38:05Z
2021-03-12T03:43:31Z
null
2021-03-12T03:43:31Z
PERF: don't sort data twice in groupby apply when not using libreduction fast_apply
diff --git a/asv_bench/benchmarks/groupby.py b/asv_bench/benchmarks/groupby.py index fb08c6fdeaedf..9930c61e34b15 100644 --- a/asv_bench/benchmarks/groupby.py +++ b/asv_bench/benchmarks/groupby.py @@ -68,9 +68,18 @@ def time_groupby_apply_dict_return(self): class Apply: - def setup_cache(self): - N = 10 ...
See https://github.com/pandas-dev/pandas/pull/40171#issuecomment-789120453 for context, noticed that we were calling `splitter._get_sorted_data()` twice when using the non-fast_apply fallback. Using the benchmark case from `groupby.Apply.time_scalar_function_single/multi_col` (like in https://github.com/pandas-dev/p...
https://api.github.com/repos/pandas-dev/pandas/pulls/40176
2021-03-02T19:34:57Z
2021-03-02T21:34:15Z
2021-03-02T21:34:15Z
2021-03-02T21:42:33Z
TYP ensure bool_t is always used in pandas/core/generic.py
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d927be76843e1..7988012498db7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -206,3 +206,8 @@ repos: files: ^pandas/core/ exclude: ^pandas/core/api\.py$ types: [python] + - id: no-bool-in-core-gene...
- [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 Currently, lots of methods use the `bool` annotation in that file. I'm not sure it affects `mypy` (some experiments with `reveal_type` suggest it doesn't) - howe...
https://api.github.com/repos/pandas-dev/pandas/pulls/40175
2021-03-02T18:43:20Z
2021-04-08T14:43:39Z
2021-04-08T14:43:39Z
2021-04-08T14:59:56Z
Backport PR #40170 on branch 1.2.x (DOC: Start v1.2.4 release notes)
diff --git a/doc/source/whatsnew/index.rst b/doc/source/whatsnew/index.rst index c9c31b408fb7e..8739694c20e33 100644 --- a/doc/source/whatsnew/index.rst +++ b/doc/source/whatsnew/index.rst @@ -16,6 +16,7 @@ Version 1.2 .. toctree:: :maxdepth: 2 + v1.2.4 v1.2.3 v1.2.2 v1.2.1 diff --git a/doc/source/...
Backport PR #40170: DOC: Start v1.2.4 release notes
https://api.github.com/repos/pandas-dev/pandas/pulls/40172
2021-03-02T12:26:43Z
2021-03-02T13:26:42Z
2021-03-02T13:26:42Z
2021-03-02T13:26:42Z
[ArrayManager] Add libreduction frame Slider for ArrayManager
diff --git a/pandas/_libs/reduction.pyx b/pandas/_libs/reduction.pyx index 4d0bd4744be5d..60e97b02863a1 100644 --- a/pandas/_libs/reduction.pyx +++ b/pandas/_libs/reduction.pyx @@ -348,7 +348,7 @@ cdef class Slider: def apply_frame_axis0(object frame, object f, object names, const int64_t[:] sta...
xref https://github.com/pandas-dev/pandas/issues/39146 and follow-up on https://github.com/pandas-dev/pandas/pull/40050#discussion_r583042707 While getting groupby working for ArrayManager in https://github.com/pandas-dev/pandas/pull/40050, I didn't yet use `fast_apply` / `libreduction.apply_frame_axis0` because tha...
https://api.github.com/repos/pandas-dev/pandas/pulls/40171
2021-03-02T11:45:22Z
2021-04-20T08:58:49Z
null
2021-04-20T08:58:49Z
DOC: Start v1.2.4 release notes
diff --git a/doc/source/whatsnew/index.rst b/doc/source/whatsnew/index.rst index 71c9b0613b3ce..8697182f5ca6f 100644 --- a/doc/source/whatsnew/index.rst +++ b/doc/source/whatsnew/index.rst @@ -24,6 +24,7 @@ Version 1.2 .. toctree:: :maxdepth: 2 + v1.2.4 v1.2.3 v1.2.2 v1.2.1 diff --git a/doc/source/...
do not merge yet. will merge to master after github release to trigger website update
https://api.github.com/repos/pandas-dev/pandas/pulls/40170
2021-03-02T11:25:41Z
2021-03-02T12:26:15Z
2021-03-02T12:26:15Z
2021-03-02T12:26:35Z
REF: remove internal Block usage from FrameColumnApply
diff --git a/pandas/core/apply.py b/pandas/core/apply.py index 15cee1419afb5..203a0c675282d 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -883,9 +883,8 @@ def series_generator(self): # of it. Kids: don't do this at home. ser = self.obj._ixs(0, axis=0) mgr = ser._mgr - ...
In the `apply` code, there is still one case where we are directly using the internal blocks. This moves that to a method on the manager, so we don't have to interact directly with the blocks (which ideally we don't want outside of the internals, and let's ArrayManager cleanly support this as well). For the rest it...
https://api.github.com/repos/pandas-dev/pandas/pulls/40166
2021-03-02T08:17:06Z
2021-03-02T17:22:49Z
2021-03-02T17:22:49Z
2021-03-02T17:22:52Z
Backport PR #40137 on branch 1.2.x (DOC: 1.2.3 release date)
diff --git a/doc/source/whatsnew/v1.2.3.rst b/doc/source/whatsnew/v1.2.3.rst index 99e997189d7b8..c94491df474ab 100644 --- a/doc/source/whatsnew/v1.2.3.rst +++ b/doc/source/whatsnew/v1.2.3.rst @@ -1,6 +1,6 @@ .. _whatsnew_123: -What's new in 1.2.3 (March ??, 2021) +What's new in 1.2.3 (March 02, 2021) -------------...
Backport PR #40137: DOC: 1.2.3 release date
https://api.github.com/repos/pandas-dev/pandas/pulls/40165
2021-03-02T07:30:49Z
2021-03-02T08:39:24Z
2021-03-02T08:39:24Z
2021-03-02T08:39:24Z
BUG: EWM.__getitem__ raised error with times
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 5c61f259a4202..9bb9f0c7a467a 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -520,7 +520,8 @@ Groupby/resample/rolling - Bug in :meth:`DataFrameGroupBy.sample` where error was raised when ``weights`` ...
- [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 somewhat ameliorates the performance hit in https://github.com/pandas-dev/pandas/pull/40072#issuecomment...
https://api.github.com/repos/pandas-dev/pandas/pulls/40164
2021-03-02T05:30:25Z
2021-03-03T13:06:59Z
2021-03-03T13:06:59Z
2021-03-03T20:23:41Z
BUG: DataFrame(frozenset) should raise
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index 41db72612a66b..ee4ca6a06a634 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -402,6 +402,7 @@ Conversion - Bug in :meth:`Series.to_dict` with ``orient='records'`` now returns python native types (:iss...
DataFrame(set) raises, and Series raises for both. This unifies the 2 places this is checked. Started out as a split-big-tests branch, so some of that is left over.
https://api.github.com/repos/pandas-dev/pandas/pulls/40163
2021-03-02T03:45:54Z
2021-03-02T23:25:54Z
2021-03-02T23:25:54Z
2021-03-02T23:37:52Z
BUG: Add decl when xml_declaration=True and pretty_print=False for et…
diff --git a/pandas/io/formats/xml.py b/pandas/io/formats/xml.py index 044b03ba83714..dd68f0f78261e 100644 --- a/pandas/io/formats/xml.py +++ b/pandas/io/formats/xml.py @@ -324,7 +324,9 @@ def build_tree(self) -> bytes: if self.pretty_print: self.out_xml = self.prettify_tree() - if not se...
…ree parser - [X] references IO XML tracker #40131 - [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 necessary, module releases: v1.3.0)
https://api.github.com/repos/pandas-dev/pandas/pulls/40162
2021-03-02T03:44:35Z
2021-03-03T03:09:05Z
2021-03-03T03:09:05Z
2021-03-04T22:51:41Z
STYLE: Inconsistent namespace - dtypes (pandas-dev#39992)
diff --git a/pandas/tests/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index bf83085058cfc..ca311768dc2d9 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -821,7 +821,7 @@ class TestCategoricalDtypeParametrized: np.arange(1000), ["a", "b...
- [x] xref #39992 - [ ] 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/40161
2021-03-02T01:25:25Z
2021-03-02T08:10:30Z
2021-03-02T08:10:30Z
2021-03-02T08:10:38Z
STYLE: incondintent namaspace(series)
diff --git a/pandas/tests/series/accessors/test_dt_accessor.py b/pandas/tests/series/accessors/test_dt_accessor.py index 6199e77e10166..5db159e1abb80 100644 --- a/pandas/tests/series/accessors/test_dt_accessor.py +++ b/pandas/tests/series/accessors/test_dt_accessor.py @@ -74,7 +74,7 @@ def get_expected(s, name): ...
- [x] xref #39992 - [ ] 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/40159
2021-03-02T00:15:55Z
2021-03-02T08:09:01Z
2021-03-02T08:09:01Z
2021-03-02T08:09:02Z
CI: npdev SystemError
diff --git a/pandas/core/dtypes/missing.py b/pandas/core/dtypes/missing.py index 642d35977ae36..945209bde05a9 100644 --- a/pandas/core/dtypes/missing.py +++ b/pandas/core/dtypes/missing.py @@ -470,7 +470,9 @@ def _array_equivalent_datetimelike(left, right): return np.array_equal(left.view("i8"), right.view("i8")) ...
cc @seberg was there a change in the ufunc code in the last day or so that might lead to a TypeError getting turned into a SystemError?
https://api.github.com/repos/pandas-dev/pandas/pulls/40158
2021-03-01T23:13:27Z
2021-03-02T01:56:25Z
null
2021-03-02T01:56:38Z
REF: refactor array_strptime_with_fallback from to_datetime
diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index 9bfe852083390..279f4bd056ed8 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -284,7 +284,7 @@ def _convert_listlike_datetimes( tz: Optional[Timezone] = None, unit: Optional[str] = None, ...
ultimate goal is to condense the several datetime casting/inference functions we use down to just one.
https://api.github.com/repos/pandas-dev/pandas/pulls/40156
2021-03-01T21:09:45Z
2021-03-02T17:27:55Z
2021-03-02T17:27:55Z
2021-03-02T17:29:16Z
REF: avoid circular (runtime) import in dtypes.cast
diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 4593b4dea78a4..71863c8925e89 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -43,6 +43,7 @@ iNaT, ints_to_pydatetime, ) +from pandas._libs.tslibs.timedeltas import array_to_timedelta64 from pandas._typing ...
- [ ] 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/40155
2021-03-01T21:08:10Z
2021-03-01T23:10:12Z
2021-03-01T23:10:12Z
2021-03-01T23:53:10Z
TYP: internals.construction
diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 178e6ce9b02eb..9f111282473c2 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1620,6 +1620,7 @@ def maybe_cast_to_datetime( dta = dta.tz_localize(None) val...
- [ ] 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/40154
2021-03-01T21:02:24Z
2021-03-03T18:41:53Z
2021-03-03T18:41:53Z
2021-03-03T18:48:27Z
TYP only set default for one overloaded function in reset_index
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 830a7f4347132..97c26310107c9 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -5098,9 +5098,7 @@ def set_index( return frame @overload - # https://github.com/python/mypy/issues/6580 - # Overloaded function signatures...
- [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 @simonjayhawkins I think we only need `=...` in one of the two overloads, then the error goes away and all passes: ```console $ mypy pandas Success: no issues...
https://api.github.com/repos/pandas-dev/pandas/pulls/40153
2021-03-01T20:46:10Z
2021-03-01T21:54:45Z
null
2021-03-01T21:54:45Z
[ArrayManager] Add SingleArrayManager to back a Series
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06a06484b921a..a84de6cda0432 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,6 +165,9 @@ jobs: pytest pandas/tests/resample/ pytest pandas/tests/reshape/merge + pytest pandas/tests/series/metho...
xref https://github.com/pandas-dev/pandas/issues/39146#issuecomment-786741804 This implements a `SingleArrayManager` class for backing a Series, consistent with how we have a SingleBlockManager. cc @jreback @jbrockmendel
https://api.github.com/repos/pandas-dev/pandas/pulls/40152
2021-03-01T20:45:53Z
2021-03-05T00:55:16Z
2021-03-05T00:55:15Z
2021-03-05T07:14:46Z
PERF: extract_array -> _values
diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index a4da249894084..74fb0e2bd54fb 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -84,7 +84,7 @@ from pandas.core.array_algos.take import take_nd from pandas.core.construction import ( - array, + array as pd_array, ...
Found that grepping for uses of pd.array is a PITA, so went through and changed them all (inside core) to pd_array. @MarcoGorelli would it be feasible to make a code check for this?
https://api.github.com/repos/pandas-dev/pandas/pulls/40150
2021-03-01T18:05:21Z
2021-03-01T21:41:50Z
2021-03-01T21:41:50Z
2021-03-02T06:43:14Z
PERF: DataFrame.transpose with dt64tz
diff --git a/doc/source/whatsnew/v1.3.0.rst b/doc/source/whatsnew/v1.3.0.rst index f6b5c30635980..ba0c4b99f861f 100644 --- a/doc/source/whatsnew/v1.3.0.rst +++ b/doc/source/whatsnew/v1.3.0.rst @@ -673,6 +673,7 @@ Performance improvements - Performance improvement for concatenation of data with type :class:`Categorical...
Does what it says on the tin: `DatetimeBlock.values` is always `DatetimeArray`, and `dt64tzblock.shape == dt64tzblock.values` in all cases. Similarly `TimedeltaBlock.values` is always `TimedeltaArray`. Notes: - It is straightforward to extend this to work for PeriodDtype (i have a branch). Haven't tried it, but I...
https://api.github.com/repos/pandas-dev/pandas/pulls/40149
2021-03-01T15:55:44Z
2021-05-17T19:17:35Z
2021-05-17T19:17:35Z
2021-05-17T19:22:05Z
[ArrayManager] Ensure to store datetimelike data as DatetimeArray/TimedeltaArray (and not ndarray)
diff --git a/pandas/core/internals/array_manager.py b/pandas/core/internals/array_manager.py index 5001754017dda..0556434c2c223 100644 --- a/pandas/core/internals/array_manager.py +++ b/pandas/core/internals/array_manager.py @@ -33,6 +33,7 @@ ) from pandas.core.dtypes.common import ( is_bool_dtype, + is_datet...
Pre-cursor for https://github.com/pandas-dev/pandas/pull/39991 Currently we didn't really check that we were consistently storing datetimelike data as the EA (DatetimeArray, TimedeltaArray) or as ndarrray. Ensuring this in the ArrayManager constructor turns up a few failures. I *think* it will be the easiest to a...
https://api.github.com/repos/pandas-dev/pandas/pulls/40147
2021-03-01T14:12:51Z
2021-03-02T21:08:13Z
2021-03-02T21:08:13Z
2021-03-03T08:22:26Z
REGR: reduction operations failing if `min_count` is larger
diff --git a/doc/source/whatsnew/v1.2.4.rst b/doc/source/whatsnew/v1.2.4.rst index 790ff4c78cad6..edf23bf89d7e1 100644 --- a/doc/source/whatsnew/v1.2.4.rst +++ b/doc/source/whatsnew/v1.2.4.rst @@ -15,7 +15,7 @@ including other versions of pandas. Fixed regressions ~~~~~~~~~~~~~~~~~ -- +- Fixed regression in :meth:`...
- [ ] closes #39738 - [ ] 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/40143
2021-03-01T13:13:59Z
2021-03-05T01:09:48Z
2021-03-05T01:09:48Z
2021-03-05T15:49:50Z
CI, TST enable branch coverage
diff --git a/setup.cfg b/setup.cfg index ce055f550a868..ca0673bd5fc34 100644 --- a/setup.cfg +++ b/setup.cfg @@ -125,7 +125,7 @@ ignore-words-list = ba,blocs,coo,hist,nd,ser ignore-regex = https://(\w+\.)+ [coverage:run] -branch = False +branch = True omit = */tests/* pandas/_typing.py
- [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 As suggested on Gitter - this could help identify more untested parts of the codebase and hence uncover bugs
https://api.github.com/repos/pandas-dev/pandas/pulls/40142
2021-03-01T12:38:29Z
2021-03-01T19:32:52Z
2021-03-01T19:32:52Z
2021-03-01T19:45:36Z
REF: move Block.astype implementation to dtypes/cast.py
diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 71863c8925e89..d456f9c56e309 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -10,6 +10,7 @@ datetime, timedelta, ) +import inspect from typing import ( TYPE_CHECKING, Any, @@ -87,6 +88,7 @@ ...
This moves the `astype` implementation (so the current logic of calling `EA.astype` or `astype_nansafe` depending on the array type, handling datetime and string special cases, handling error keyword, etc) from being defined on `Block` to the `array_algos/` submodule. That's a useful clean-up anyway I think (it's n...
https://api.github.com/repos/pandas-dev/pandas/pulls/40141
2021-03-01T11:30:20Z
2021-03-02T17:23:42Z
2021-03-02T17:23:42Z
2021-03-02T17:23:46Z
to_offset was not using the compiled regex
diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index 2d4704ad3bda6..4e6e5485b2ade 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -3579,7 +3579,7 @@ cpdef to_offset(freq): stride_sign = None try: - split = re.split(opat...
- [x] closes #39988 - [ ] 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/40138
2021-03-01T09:12:42Z
2021-03-01T13:54:59Z
2021-03-01T13:54:59Z
2021-03-01T13:55:03Z
DOC: 1.2.3 release date
diff --git a/doc/source/whatsnew/v1.2.3.rst b/doc/source/whatsnew/v1.2.3.rst index 99e997189d7b8..c94491df474ab 100644 --- a/doc/source/whatsnew/v1.2.3.rst +++ b/doc/source/whatsnew/v1.2.3.rst @@ -1,6 +1,6 @@ .. _whatsnew_123: -What's new in 1.2.3 (March ??, 2021) +What's new in 1.2.3 (March 02, 2021) -------------...
https://api.github.com/repos/pandas-dev/pandas/pulls/40137
2021-03-01T08:25:54Z
2021-03-02T07:30:15Z
2021-03-02T07:30:15Z
2021-03-02T07:31:26Z
⬆️ UPGRADE: Autoupdate pre-commit config
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47a9ae592f940..d4ba8f48d2fb0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - id: pyupgrade args: [--py37-plus, --keep-runtime-typing] - repo: https://github.com/pre-commit/pygrep-hooks -...
<!-- START pr-commits --> <!-- END pr-commits --> ## Base PullRequest default branch (https://github.com/pandas-dev/pandas/tree/master) ## Command results <details> <summary>Details: </summary> <details> <summary><em>add path</em></summary> ```Shell /home/runner/work/_actions/technote-space/create-pr-action/v2/nod...
https://api.github.com/repos/pandas-dev/pandas/pulls/40136
2021-03-01T07:25:19Z
2021-03-01T09:17:52Z
null
2021-03-01T09:17:59Z
WIP: ENH: Support ZoneInfo timezones
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 464bad7884362..aeb187b7f1376 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -40,6 +40,7 @@ jobs: . ~/virtualenvs/pandas-dev/bin/activate && \ python -m pip install --no-deps -U pip wheel setuptools && \ pip install cy...
- [ ] closes #37654 - [ ] 1 tests added / 0 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 WIP for #37654. Starting from scratch on this one. I will mark this ready for a revie...
https://api.github.com/repos/pandas-dev/pandas/pulls/40135
2021-03-01T07:20:54Z
2021-05-25T12:07:29Z
null
2022-01-22T10:07:38Z
DEPR: `Styler.set_na_rep` and `.set_precision` in favour of `.format(na_rep='x', precision=3)`
diff --git a/doc/source/reference/style.rst b/doc/source/reference/style.rst index 3a8d912fa6ffe..79a52b7cdb9d1 100644 --- a/doc/source/reference/style.rst +++ b/doc/source/reference/style.rst @@ -35,7 +35,6 @@ Style application Styler.applymap Styler.where Styler.format - Styler.set_precision Styler....
- [x] closes issue #40032 and PR #40060 - [x] deprecates the methods `Styler.set_na_rep()` and `Styler.set_precision()` in favour of, and incorporating `precision` into `Styler.format()`. Maintains some backwards compatibility with a deprecation warning, the copy mechanics remain broken. - [x] `Styler.set_na_r...
https://api.github.com/repos/pandas-dev/pandas/pulls/40134
2021-03-01T06:30:47Z
2021-03-05T22:07:58Z
2021-03-05T22:07:58Z
2022-10-28T16:49:39Z