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
Checks for tz/tzinfo validity in Timestamp.__new__
diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 53b052a955b45..0d177f193b68e 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -40,7 +40,7 @@ Backwards incompatible API changes Other API Changes ^^^^^^^^^^^^^^^^^ -- +- :class:`Timestamp` will ...
closes #17690 related #5168 - [x] closes #17690 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17943
2017-10-22T22:50:58Z
2017-10-27T20:30:48Z
2017-10-27T20:30:48Z
2017-10-27T22:13:56Z
fix redundant isinstance checks
diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 5d40975586e73..71de6c7c3e8cf 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -24,8 +24,7 @@ from pandas.core.common import AbstractMethodError import pandas.io.formats.printing ...
- [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17942
2017-10-22T18:14:26Z
2017-10-23T10:22:25Z
2017-10-23T10:22:25Z
2017-10-30T16:22:54Z
DOC: Clarify use of resample bins (#14888)
diff --git a/doc/source/timeseries.rst b/doc/source/timeseries.rst index 36ffe8806f373..fbb2947d8c957 100644 --- a/doc/source/timeseries.rst +++ b/doc/source/timeseries.rst @@ -1485,12 +1485,31 @@ labels. .. ipython:: python - ts.resample('5Min').mean() # by default label='right' + ts.resample('5Min').mean() #...
- [ ] closes #14888
https://api.github.com/repos/pandas-dev/pandas/pulls/17940
2017-10-21T21:21:28Z
2017-10-23T08:59:04Z
2017-10-23T08:59:04Z
2017-11-06T19:46:06Z
Port Timedelta implementation to tslibs.timedeltas
diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index d2492064c900c..419f1160aa3df 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -72,7 +72,6 @@ cimport cython from pandas.compat import iteritems -import collections import warnings import pytz @@ -2020,17 +2019,13 @@ cpdef arr...
Cut/paste Timedelta and _Timedelta methods into tslibs.timesdeltas._Timedelta. The moved methods are copied verbatim. Timedelta._binary_op_method_timedeltalike and Timedelta._op_unary_method do not use `self`, are moved out of the class definitions (but stay in tslib). (In a follow-up _op_unary_method can be moved...
https://api.github.com/repos/pandas-dev/pandas/pulls/17937
2017-10-21T19:16:38Z
2017-11-03T00:57:40Z
2017-11-03T00:57:40Z
2017-11-03T02:36:53Z
BUG: fix dtype of all-NaN MultiIndex level
diff --git a/asv_bench/benchmarks/categoricals.py b/asv_bench/benchmarks/categoricals.py index d90c994b3d194..a5bb5e790dec1 100644 --- a/asv_bench/benchmarks/categoricals.py +++ b/asv_bench/benchmarks/categoricals.py @@ -26,6 +26,9 @@ def setup(self): self.datetimes = pd.Series(pd.date_range( '199...
- [x] closes #17929 - [x] tests added / passed - [x] passes `git diff master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry (This will need to be rebased on #17930 , but in the meanwhile it is useful for discussion) An alternative, more radical, fix is to have ``pd.CategoricalIndex([np.nan]).dtype.categori...
https://api.github.com/repos/pandas-dev/pandas/pulls/17934
2017-10-21T09:55:28Z
2017-10-29T19:11:07Z
2017-10-29T19:11:07Z
2017-10-29T21:26:46Z
Fix c build warnings #17634; remove several unused funcs
diff --git a/pandas/_libs/parsers.pyx b/pandas/_libs/parsers.pyx index 60a646769dd1a..0dacdf70a71d5 100644 --- a/pandas/_libs/parsers.pyx +++ b/pandas/_libs/parsers.pyx @@ -12,7 +12,7 @@ from cpython cimport (PyObject, PyBytes_FromString, PyBytes_AsString, PyBytes_Check, Py...
Removes several unused functions, most importantly `floatify` which util attempts to import from numpy_helper but which does not exist there. While putting this together I noticed in parsers.pyx a couple occurrences of`print >> sys.stderr, self.parser.warn_msg`. I guess this is still valid cython, but should probab...
https://api.github.com/repos/pandas-dev/pandas/pulls/17932
2017-10-20T21:22:01Z
2017-10-21T14:31:49Z
2017-10-21T14:31:49Z
2017-10-30T16:22:52Z
BUG: get_level_values() on int level upcasts to Float64Index if needed
diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 841eec69d41ba..3d4abea862b12 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -189,7 +189,7 @@ Other API Changes - :func:`pandas.DataFrame.merge` no longer casts a ``float`` column to ``object`` wh...
- [x] closes #17924 - [x] tests added / passed - [x] passes `git diff master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry Maybe the check could be more general... but I can't think of any case in which this is needed other than ``int`` -> ``float``.
https://api.github.com/repos/pandas-dev/pandas/pulls/17930
2017-10-20T16:44:26Z
2017-12-10T23:23:13Z
2017-12-10T23:23:13Z
2017-12-10T23:33:13Z
BUG: Fix alignment of list-like objects for operations with DataFrame
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 2b2dd4915b560..18f8858748df5 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -1049,6 +1049,7 @@ Reshaping - Bug in :func:`pivot_table` where the result's columns did not preserve the categorical d...
- [X] closes #17901 - [X] tests added / passed - [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [X] whatsnew entry Some comments: - Replaced `pd.DataFrame` with `ABCDataFrame` in `isinstance` checks throughout `ops.py`, as I'm of the impression that this is the best practice. Can revert th...
https://api.github.com/repos/pandas-dev/pandas/pulls/17926
2017-10-20T00:06:19Z
2017-10-20T10:12:50Z
2017-10-20T10:12:50Z
2017-10-22T05:46:30Z
DOC: Improve truncate docstring (#17763)
diff --git a/doc/source/timeseries.rst b/doc/source/timeseries.rst index 36ffe8806f373..fa8d036b655e6 100644 --- a/doc/source/timeseries.rst +++ b/doc/source/timeseries.rst @@ -657,18 +657,25 @@ With no defaults. Truncating & Fancy Indexing ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -A ``truncate`` convenience function is provide...
- [ ] closes #17763
https://api.github.com/repos/pandas-dev/pandas/pulls/17925
2017-10-19T23:27:25Z
2017-10-21T13:55:19Z
2017-10-21T13:55:19Z
2017-11-27T14:48:52Z
DOC: Removed references to v0.17 in docs and doc strings
diff --git a/doc/source/basics.rst b/doc/source/basics.rst index f5c9e1d78e0fc..9318df2b76564 100644 --- a/doc/source/basics.rst +++ b/doc/source/basics.rst @@ -1738,11 +1738,6 @@ description. Sorting ------- -.. warning:: - - The sorting API is substantially changed in 0.17.0, see :ref:`here <whatsnew_0170.api_b...
- [ x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` This PR removes references to changes and "versionadded" for pandas v0.17. This can be considered a continuation to #17504. I propose pulling this in as soon as 0.21 is released. Alternatively, these could be accepted in v0.21, as these refe...
https://api.github.com/repos/pandas-dev/pandas/pulls/17923
2017-10-19T21:34:42Z
2017-10-30T08:29:25Z
2017-10-30T08:29:24Z
2017-11-06T21:46:42Z
DOC: Fix docstring for DataFrame.plot
diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index ad3c4f0ecb05f..43f33cf30dea1 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1847,8 +1847,6 @@ def _plot(data, x=None, y=None, subplots=False, position : float Specify relative alignments for bar plot layout. ...
The layout parameter appears twice in the parameter list. - [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17922
2017-10-19T20:36:39Z
2017-10-19T22:26:59Z
2017-10-19T22:26:59Z
2017-10-20T17:01:52Z
DOC: Fix improper single backticks in whatsnew
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index a889292cacc99..f7b7347f9bdab 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -267,7 +267,7 @@ Other Enhancements - :func:`DataFrame.items` and :func:`Series.items` are now present in both Python 2...
Noticed a few places in whatsnew where items are only surrounded by single backticks, which appears to cause them to render as italic. For the most part I replaced these with double backticks, e.g. <code>\`Series\`</code> -> <code>\`\`Series\`\`</code>, or removed the backticks if they didn't seem appropriate.
https://api.github.com/repos/pandas-dev/pandas/pulls/17916
2017-10-18T23:34:46Z
2017-10-19T07:16:23Z
2017-10-19T07:16:23Z
2017-10-19T15:34:48Z
DOC: some doc fixes
diff --git a/doc/source/api.rst b/doc/source/api.rst index bec35bac0d33e..80f8d42be8ed6 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -649,6 +649,7 @@ The dtype of a ``Categorical`` can be described by a :class:`pandas.api.types.Ca .. autosummary:: :toctree: generated/ + :template: autosummary/cl...
https://api.github.com/repos/pandas-dev/pandas/pulls/17913
2017-10-18T20:01:50Z
2017-10-19T20:10:35Z
2017-10-19T20:10:35Z
2017-10-19T20:10:39Z
tslib flake8 cleanup, missing declarations
diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index f58aaa0ce3234..62224d75db37f 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -49,6 +49,7 @@ from datetime cimport ( check_dts_bounds, PANDAS_FR_ns, PyDateTime_Check, PyDate_Check, + PyDelta_Check, # PyDelta_Check(x...
replace `isinstance` checks with the faster C versions change cpdef-->cdef for internal field-getter methods remove get_named_field in favor of faster dict lookup (yah yah I'll show asv results in a bit) - [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --...
https://api.github.com/repos/pandas-dev/pandas/pulls/17907
2017-10-17T19:37:36Z
2017-10-20T13:30:29Z
2017-10-20T13:30:29Z
2017-10-30T16:25:16Z
Add timestamp method+test; closes #17329
diff --git a/doc/source/api.rst b/doc/source/api.rst index 80f8d42be8ed6..e8b8b3624740d 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1794,6 +1794,7 @@ Methods Timestamp.strftime Timestamp.strptime Timestamp.time + Timestamp.timestamp Timestamp.timetuple Timestamp.timetz ...
- [x] closes #17329 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17906
2017-10-17T17:34:44Z
2017-10-27T22:03:56Z
2017-10-27T22:03:55Z
2017-12-11T20:25:18Z
BUG: rank with +-inf, #6945
diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 09b504cac5ed4..d14bc917de356 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -63,6 +63,91 @@ levels <merging.merge_on_columns_and_levels>` documentation section. left.merge(right, on=['key1', '...
The bug is caused by replacing nan with positive infinite or negative infinite values. As a result, when keep_na is true, both real nan and positive/negative infinite will be assigned nan as the rank. The solution is to keep track of the real nan value when generate the nan mask. - [x] closes #6945 - [x] tests ad...
https://api.github.com/repos/pandas-dev/pandas/pulls/17903
2017-10-17T11:00:01Z
2017-12-06T11:29:14Z
2017-12-06T11:29:14Z
2018-04-20T06:16:41Z
Revert "ERR: Raise ValueError when setting scalars in a dataframe with no index ( #16823) (#16968)"
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 598e452640781..80c27504996f2 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -791,8 +791,6 @@ Other API Changes - Restricted DateOffset keyword arguments. Previously, ``DateOffset`` subclasses al...
closes #17894 xref #16823
https://api.github.com/repos/pandas-dev/pandas/pulls/17902
2017-10-17T10:29:02Z
2017-10-18T10:26:39Z
2017-10-18T10:26:38Z
2017-10-18T11:09:04Z
ENH: Add 'infer' option to compression in _get_handle()
diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index a2210c39bb6a6..42a511bc3bb55 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -83,6 +83,7 @@ Other Enhancements - :func:`read_html` copies cell data across ``colspan``s and ``rowspan``s, and it tre...
xref #15008 xref #17262 Added 'infer' option to compression in `_get_handle()`. This way for example `.to_csv()` is made more similar to `pandas.read_csv()`. The default value remains `None `to keep backward compatibility. - [ ] closes #xxxx - [ ] tests passed ( 14046 passed, 1637 skipped, 11 xfailed, 1 xpa...
https://api.github.com/repos/pandas-dev/pandas/pulls/17900
2017-10-17T02:49:57Z
2018-07-08T13:05:01Z
2018-07-08T13:05:01Z
2018-07-20T20:40:48Z
API: add "level=" argument to MultiIndex.unique()
diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 6dc730cae37f7..a9f35fb482792 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -24,6 +24,7 @@ Other Enhancements - Better support for :func:`Dataframe.style.to_excel` output with the ``xlsxwriter`...
- [x] closes #17896 - [x] tests added / passed - [x] passes `git diff master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17897
2017-10-16T18:00:18Z
2017-11-20T07:32:51Z
2017-11-20T07:32:51Z
2017-11-20T08:11:02Z
CategoricalDtype construction: actually use fastpath
diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index 2fdbad93fa63b..b3498abb3b2c0 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -178,7 +178,7 @@ def _finalize(self, categories, ordered, fastpath=False): if categories is not None: categori...
cc @TomAugspurger the current `CategoricalDtype._from_fastpath(..)` was not any different from `CategoricalDtype(..)` as far as I could see, as the `fastpath` argument in `_finalize` was not used. This seems the logical fix.
https://api.github.com/repos/pandas-dev/pandas/pulls/17891
2017-10-16T10:33:18Z
2017-10-16T12:24:06Z
2017-10-16T12:24:06Z
2017-10-16T13:13:05Z
BUG: Categorical(Index) passed as categories
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 642ee3c8e54c7..30fbe2fd387b6 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -1023,6 +1023,7 @@ Categorical - Bug in the categorical constructor with empty values and categories causing the ``.cat...
- [x] closes #17884 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry @TomAugspurger I am not sure we had a discussion about that before, but to me it does not make many sense to have a CategoricalIndex as the categories of a Categorical/Categoric...
https://api.github.com/repos/pandas-dev/pandas/pulls/17888
2017-10-16T08:19:12Z
2017-10-18T00:03:45Z
2017-10-18T00:03:44Z
2017-10-18T07:53:35Z
BUG: support "fill_value" for ".unstack()" called with list of levels
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 642ee3c8e54c7..598e452640781 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -1010,6 +1010,7 @@ Reshaping - Fixes regression when sorting by multiple columns on a ``datetime64`` dtype ``Series`` w...
- [x] closes #13971 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry Notice this is a simple fix which doesn't make @kordek 's [more general comment](https://github.com/pandas-dev/pandas/issues/13971#issuecomment-243558072) about the opportunity ...
https://api.github.com/repos/pandas-dev/pandas/pulls/17887
2017-10-16T08:05:04Z
2017-10-16T14:25:24Z
2017-10-16T14:25:24Z
2017-10-16T14:38:37Z
CLN: amended TypeError from pd.concat() to be more informative (GH15796)
diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index e2c02bd0e71fb..648fa5b835e15 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -262,7 +262,10 @@ def __init__(self, objs, axis=0, join='outer', join_axes=None, ndims = set() for obj in objs...
CLN/TST: Added regex matching for exception message - [X] closes #15796 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
https://api.github.com/repos/pandas-dev/pandas/pulls/17885
2017-10-16T06:45:28Z
2017-10-18T10:27:57Z
2017-10-18T10:27:57Z
2017-11-01T00:17:38Z
TST: Skip if no openpyxl in test_excel
diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index f21f638799e57..7af8bd12ca805 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -975,6 +975,7 @@ def test_read_excel_chunksize(self): def test_read_excel_parse_dates(self): # GH 11544, 12051 +...
`test_read_excel_parse_dates` was calling `to_excel` without checking if `openpyxl` was installed. Should skip the test if not installed. Will merge on green.
https://api.github.com/repos/pandas-dev/pandas/pulls/17883
2017-10-15T23:49:42Z
2017-10-16T00:29:58Z
2017-10-16T00:29:58Z
2017-10-16T00:53:23Z
BUG: formating integers datetimes using sql GH17855
diff --git a/pandas/io/sql.py b/pandas/io/sql.py index 82b1bff75b114..401a9c11a774d 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -103,12 +103,12 @@ def _handle_date_column(col, utc=None, format=None): if isinstance(format, dict): return to_datetime(col, errors='ignore', **format) else: - ...
- [x] closes #17855 - [x] tests passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17882
2017-10-15T20:24:02Z
2017-11-22T19:24:37Z
2017-11-22T19:24:36Z
2018-01-19T19:39:27Z
EHN: Improve from_items error message (#17312)
diff --git a/doc/source/whatsnew/v0.22.0.txt b/doc/source/whatsnew/v0.22.0.txt index 4ae3d9be04aa7..2b5f899091edd 100644 --- a/doc/source/whatsnew/v0.22.0.txt +++ b/doc/source/whatsnew/v0.22.0.txt @@ -80,6 +80,7 @@ Other API Changes - :class:`IntervalIndex` constructor will raise if the ``closed`` parameter conflicts ...
- [ ] closes #17312 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17881
2017-10-15T17:34:54Z
2017-11-26T15:09:26Z
2017-11-26T15:09:26Z
2017-12-10T16:14:29Z
BUG: Fix wrong column selection in drop_duplicates when duplicate column names
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 117e7c9d11259..09217b9cb81be 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -1006,6 +1006,7 @@ Reshaping - Bug in :func:`concat` where order of result index was unpredictable if it contained non-...
- [x] closes #17836 - [x] tests added / passed - [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [x] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17879
2017-10-15T08:37:50Z
2017-10-16T10:27:21Z
2017-10-16T10:27:21Z
2017-10-16T10:27:28Z
DEPR: Deprecate tupleize_cols in to_csv
diff --git a/doc/source/whatsnew/v0.21.0.txt b/doc/source/whatsnew/v0.21.0.txt index 5577089c776ed..b0d1169b6bcd6 100644 --- a/doc/source/whatsnew/v0.21.0.txt +++ b/doc/source/whatsnew/v0.21.0.txt @@ -803,6 +803,7 @@ Deprecations - :func:`read_excel()` has deprecated ``sheetname`` in favor of ``sheet_name`` for consis...
Title is self-explanatory. xref #17060
https://api.github.com/repos/pandas-dev/pandas/pulls/17877
2017-10-15T00:31:46Z
2017-10-16T10:28:35Z
2017-10-16T10:28:35Z
2017-10-16T14:54:57Z
Separate conversion functions out from tslib
diff --git a/pandas/_libs/tslib.pyx b/pandas/_libs/tslib.pyx index 7a335b19eb87b..daa1d385b474c 100644 --- a/pandas/_libs/tslib.pyx +++ b/pandas/_libs/tslib.pyx @@ -75,6 +75,9 @@ from pandas.compat import iteritems import collections import warnings +import pytz +UTC = pytz.utc + # initialize numpy import_array()...
The functions moved are cut/paste with two exceptions: a flake8 whitespace fixup and the new helper function `conversion._render_tstamp`. About half of the remaining `_TSObject` conversion funcs can be moved once #17805 is merged. The remainder can be isolated after #17793.
https://api.github.com/repos/pandas-dev/pandas/pulls/17875
2017-10-14T23:58:36Z
2017-10-31T00:45:24Z
2017-10-31T00:45:24Z
2017-10-31T00:59:01Z
MAINT: Catch read_html slow test warning
diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index 6fc080c8d9090..8dfae2733ef20 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -335,8 +335,10 @@ def test_multiindex_header_index(self): @pytest.mark.slow def test_multiindex_header_skiprows_tuples(s...
https://travis-ci.org/pandas-dev/pandas/jobs/288033917#L3135 Follow up to #17872. xref #17870, #17865. Will merge this PR on green.
https://api.github.com/repos/pandas-dev/pandas/pulls/17874
2017-10-14T23:43:46Z
2017-10-15T00:33:12Z
2017-10-15T00:33:12Z
2017-10-15T00:42:23Z
Follow-up to #17770
diff --git a/pandas/_libs/tslibs/fields.pyx b/pandas/_libs/tslibs/fields.pyx index 3ea414b2d4a70..1427bf50239ba 100644 --- a/pandas/_libs/tslibs/fields.pyx +++ b/pandas/_libs/tslibs/fields.pyx @@ -160,7 +160,9 @@ def get_start_end_field(ndarray[int64_t] dtindex, object field, if field == 'is_month_start': ...
Just flake8 cleanup - [ ] closes #xxxx - [ ] tests added / passed - [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ ] whatsnew entry
https://api.github.com/repos/pandas-dev/pandas/pulls/17873
2017-10-14T22:29:41Z
2017-10-14T23:44:51Z
2017-10-14T23:44:51Z
2017-10-30T16:25:12Z
TST: remove moar warnings
diff --git a/pandas/core/dtypes/missing.py b/pandas/core/dtypes/missing.py index 49b7b1d1d3a9b..d8973dd2eb27a 100644 --- a/pandas/core/dtypes/missing.py +++ b/pandas/core/dtypes/missing.py @@ -327,6 +327,12 @@ def array_equivalent(left, right, strict_nan=False): left = left.view('i8') right = right.vi...
https://api.github.com/repos/pandas-dev/pandas/pulls/17872
2017-10-14T20:05:50Z
2017-10-14T21:09:09Z
2017-10-14T21:09:09Z
2017-10-14T21:19:21Z
ENH: add GroupBy.pipe method
diff --git a/doc/source/api.rst b/doc/source/api.rst index 1e63a938ff389..bec35bac0d33e 100644 --- a/doc/source/api.rst +++ b/doc/source/api.rst @@ -1973,6 +1973,7 @@ Function application GroupBy.apply GroupBy.aggregate GroupBy.transform + GroupBy.pipe Computations / Descriptive Stats ~~~~~~~~~~~~~~~~...
- [x ] closes #10353, see also #17863 - [x ] tests added / passed - [ x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` - [ x] whatsnew entry This PR adds a ``.pipe`` method to GroupBy objects like for ``DataFrame.pipe`` and ``Series .pipe``. This PR is basically #10466 written by @ghl3 with so...
https://api.github.com/repos/pandas-dev/pandas/pulls/17871
2017-10-14T19:58:27Z
2017-10-18T10:30:17Z
2017-10-18T10:30:16Z
2017-11-06T21:46:44Z
TST: remove some deprecation warnings
diff --git a/pandas/io/html.py b/pandas/io/html.py index b5aaffcf710c2..6f98683a1bff1 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -759,7 +759,7 @@ def _parse(flavor, io, match, attrs, encoding, **kwargs): def read_html(io, match='.+', flavor=None, header=None, index_col=None, skiprows=No...
https://api.github.com/repos/pandas-dev/pandas/pulls/17870
2017-10-14T15:18:52Z
2017-10-14T18:50:47Z
2017-10-14T18:50:47Z
2017-10-14T18:51:58Z
DEPR: Deprecate read_csv arguments fully
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index c7e8c0da75e2c..97943f153319b 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1294,7 +1294,7 @@ def _from_arrays(cls, arrays, columns, index, dtype=None): @classmethod def from_csv(cls, path, header=0, sep=',', index_col=0, parse...
Issue warnings on `read_csv` deprecated args in full, even if the normal defaults were passed in. Closes #17828.
https://api.github.com/repos/pandas-dev/pandas/pulls/17865
2017-10-13T17:50:04Z
2017-10-14T14:39:07Z
2017-10-14T14:39:06Z
2017-10-14T18:07:08Z
DOC: Adding examples to update docstring (#16812)
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index c7e8c0da75e2c..250978f79fba1 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4154,6 +4154,61 @@ def update(self, other, join='left', overwrite=True, filter_func=None, raise_conflict : boolean If True, will raise an err...
- [ ] closes #16812
https://api.github.com/repos/pandas-dev/pandas/pulls/17859
2017-10-12T23:15:53Z
2017-10-16T06:59:05Z
2017-10-16T06:59:05Z
2017-11-17T22:37:22Z
Whatsnew cleanup
diff --git a/MANIFEST.in b/MANIFEST.in index 1a6b831c1b975..9773019c6e6e0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ include MANIFEST.in include LICENSE include RELEASE.md -include README.rst +include README.md include setup.py include pyproject.toml diff --git a/doc/source/api.rst b/doc/source/a...
A few changes: - Updated release.rst - Update 0.21.0.txt - Fixed CategoricalDtype API docs and references (this introduced more warnings into the doc build. I plan to spend a day or two with sphinx sometime in the next month fixing all these and getting us on the latest numpydoc and sphinx) - Adds an `announce.py...
https://api.github.com/repos/pandas-dev/pandas/pulls/17858
2017-10-12T20:30:34Z
2017-10-13T01:32:08Z
2017-10-13T01:32:07Z
2017-10-27T12:04:25Z
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
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
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
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
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
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
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
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