Skip to content

Commit f1571a8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into styler_apply
2 parents c6173b5 + 421fb8d commit f1571a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+509
-378
lines changed

.github/ISSUE_TEMPLATE/documentation_improvement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ labels: "Docs, Needs Triage"
99

1010
#### Location of the documentation
1111

12-
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://dev.pandas.io/docs/reference/api/pandas.read_csv.html"]
12+
[this should provide the location of the documentation, e.g. "pandas.read_csv" or the URL of the documentation, e.g. "https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html"]
1313

1414
**Note**: You can check the latest versions of the docs on `master` [here](https://pandas.pydata.org/docs/dev/).
1515

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,6 @@ repos:
192192
files: ^pandas/
193193
exclude: ^pandas/tests/
194194
- repo: https://github.com/MarcoGorelli/no-string-hints
195-
rev: v0.1.5
195+
rev: v0.1.6
196196
hooks:
197197
- id: no-string-hints

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="https://dev.pandas.io/static/img/pandas.svg"><br>
2+
<img src="https://pandas.pydata.org/static/img/pandas.svg"><br>
33
</div>
44

55
-----------------

asv_bench/benchmarks/indexing.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,20 @@ def time_loc_list(self, monotonic):
243243
monotonic.loc[80000:]
244244

245245

246+
class DatetimeIndexIndexing:
247+
def setup(self):
248+
dti = date_range("2016-01-01", periods=10000, tz="US/Pacific")
249+
dti2 = dti.tz_convert("UTC")
250+
self.dti = dti
251+
self.dti2 = dti2
252+
253+
def time_get_indexer_mismatched_tz(self):
254+
# reached via e.g.
255+
# ser = Series(range(len(dti)), index=dti)
256+
# ser[dti2]
257+
self.dti.get_indexer(self.dti2)
258+
259+
246260
class CategoricalIndexIndexing:
247261

248262
params = ["monotonic_incr", "monotonic_decr", "non_monotonic"]

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ If installed, we now require:
829829
| pytest (dev) | 4.0.2 | |
830830
+-----------------+-----------------+----------+
831831
832-
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
832+
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
833833
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
834834
Optional libraries below the lowest tested version may still work, but are not considered supported.
835835

doc/source/whatsnew/v1.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ version releases. Briefly,
2727

2828
See :ref:`policies.version` for more.
2929

30-
.. _2019 Pandas User Survey: http://dev.pandas.io/pandas-blog/2019-pandas-user-survey.html
30+
.. _2019 Pandas User Survey: https://pandas.pydata.org/community/blog/2019-user-survey.html
3131
.. _SemVer: https://semver.org
3232

3333
{{ header }}
@@ -702,7 +702,7 @@ If installed, we now require:
702702
| pytest (dev) | 4.0.2 | | |
703703
+-----------------+-----------------+----------+---------+
704704

705-
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
705+
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
706706
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
707707
Optional libraries below the lowest tested version may still work, but are not considered supported.
708708

doc/source/whatsnew/v1.1.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ If installed, we now require:
751751
| pytest (dev) | 4.0.2 | | |
752752
+-----------------+-----------------+----------+---------+
753753

754-
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
754+
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
755755
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
756756
Optional libraries below the lowest tested version may still work, but are not considered supported.
757757

doc/source/whatsnew/v1.2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ If installed, we now require:
448448
| mypy (dev) | 0.782 | | X |
449449
+-----------------+-----------------+----------+---------+
450450

451-
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
451+
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
452452
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
453453
Optional libraries below the lowest tested version may still work, but are not considered supported.
454454

doc/source/whatsnew/v1.3.0.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ If installed, we now require:
121121
| mypy (dev) | 0.790 | | X |
122122
+-----------------+-----------------+----------+---------+
123123

124-
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
124+
For `optional libraries <https://pandas.pydata.org/docs/getting_started/install.html>`_ the general recommendation is to use the latest version.
125125
The following table lists the lowest version per library that is currently being tested throughout the development of pandas.
126126
Optional libraries below the lowest tested version may still work, but are not considered supported.
127127

@@ -208,6 +208,7 @@ Performance improvements
208208
- Performance improvement in :meth:`Series.mean` for nullable data types (:issue:`34814`)
209209
- Performance improvement in :meth:`Series.isin` for nullable data types (:issue:`38340`)
210210
- Performance improvement in :meth:`DataFrame.corr` for method=kendall (:issue:`28329`)
211+
- Performance improvement in :meth:`core.window.Rolling.corr` and :meth:`core.window.Rolling.cov` (:issue:`39388`)
211212

212213
.. ---------------------------------------------------------------------------
213214
@@ -290,6 +291,7 @@ Indexing
290291
- Bug in :meth:`DataFrame.iloc.__setitem__` and :meth:`DataFrame.loc.__setitem__` with mixed dtypes when setting with a dictionary value (:issue:`38335`)
291292
- Bug in :meth:`DataFrame.__setitem__` not raising ``ValueError`` when right hand side is a :class:`DataFrame` with wrong number of columns (:issue:`38604`)
292293
- Bug in :meth:`DataFrame.loc` dropping levels of :class:`MultiIndex` when :class:`DataFrame` used as input has only one row (:issue:`10521`)
294+
- Bug in :meth:`DataFrame.__getitem__` and :meth:`Series.__getitem__` always raising ``KeyError`` when slicing with existing strings an :class:`Index` with milliseconds (:issue:`33589`)
293295
- Bug in setting ``timedelta64`` values into numeric :class:`Series` failing to cast to object dtype (:issue:`39086`)
294296
- Bug in setting :class:`Interval` values into a :class:`Series` or :class:`DataFrame` with mismatched :class:`IntervalDtype` incorrectly casting the new values to the existing dtype (:issue:`39120`)
295297
- Bug in incorrectly raising in :meth:`Index.insert`, when setting a new column that cannot be held in the existing ``frame.columns``, or in :meth:`Series.reset_index` or :meth:`DataFrame.reset_index` instead of casting to a compatible dtype (:issue:`39068`)
@@ -332,7 +334,7 @@ I/O
332334

333335
Period
334336
^^^^^^
335-
- Comparisons of :class:`Period` objects or :class:`Index`, :class:`Series`, or :class:`DataFrame` with mismatched ``PeriodDtype`` now behave like other mismatched-type comparisons, returning ``False`` for equals, ``True`` for not-equal, and raising ``TypeError`` for inequality checks (:issue:`??`)
337+
- Comparisons of :class:`Period` objects or :class:`Index`, :class:`Series`, or :class:`DataFrame` with mismatched ``PeriodDtype`` now behave like other mismatched-type comparisons, returning ``False`` for equals, ``True`` for not-equal, and raising ``TypeError`` for inequality checks (:issue:`39274`)
336338
-
337339
-
338340

@@ -353,6 +355,7 @@ Groupby/resample/rolling
353355
- Fixed bug in :meth:`DataFrameGroupBy.cumsum`, :meth:`SeriesGroupBy.cumsum`, :meth:`DataFrameGroupBy.mean` and :meth:`SeriesGroupBy.mean` causing loss of precision through using Kahan summation (:issue:`38934`)
354356
- Bug in :meth:`.Resampler.aggregate` and :meth:`DataFrame.transform` raising ``TypeError`` instead of ``SpecificationError`` when missing keys had mixed dtypes (:issue:`39025`)
355357
- Bug in :meth:`.DataFrameGroupBy.idxmin` and :meth:`.DataFrameGroupBy.idxmax` with ``ExtensionDtype`` columns (:issue:`38733`)
358+
- Bug in :meth:`Series.resample` would raise when the index was a :class:`PeriodIndex` consisting of ``NaT`` (:issue:`39227`)
356359

357360
Reshaping
358361
^^^^^^^^^
@@ -382,7 +385,7 @@ ExtensionArray
382385
Other
383386
^^^^^
384387
- Bug in :class:`Index` constructor sometimes silently ignorning a specified ``dtype`` (:issue:`38879`)
385-
-
388+
- Bug in constructing a :class:`Series` from a list and a :class:`PandasDtype` (:issue:`39357`)
386389
-
387390

388391
.. ---------------------------------------------------------------------------

pandas/core/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
needs_i8_conversion,
4848
pandas_dtype,
4949
)
50+
from pandas.core.dtypes.dtypes import PandasDtype
5051
from pandas.core.dtypes.generic import (
5152
ABCDatetimeArray,
5253
ABCExtensionArray,
@@ -1929,7 +1930,6 @@ def diff(arr, n: int, axis: int = 0, stacklevel=3):
19291930
-------
19301931
shifted
19311932
"""
1932-
from pandas.core.arrays import PandasDtype
19331933

19341934
n = int(n)
19351935
na = np.nan
@@ -1942,7 +1942,7 @@ def diff(arr, n: int, axis: int = 0, stacklevel=3):
19421942

19431943
if isinstance(dtype, PandasDtype):
19441944
# PandasArray cannot necessarily hold shifted versions of itself.
1945-
arr = np.asarray(arr)
1945+
arr = arr.to_numpy()
19461946
dtype = arr.dtype
19471947

19481948
if is_extension_array_dtype(dtype):

0 commit comments

Comments
 (0)