Skip to content

Commit 3c506b3

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into sty-private
2 parents 8edb269 + 7d16224 commit 3c506b3

Some content is hidden

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

53 files changed

+1333
-568
lines changed

doc/source/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.1
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.1.3
2728
v1.1.2
2829
v1.1.1
2930
v1.1.0

doc/source/whatsnew/v1.1.2.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_112:
22

3-
What's new in 1.1.2 (??)
4-
------------------------
3+
What's new in 1.1.2 (September 8, 2020)
4+
---------------------------------------
55

66
These are the changes in pandas 1.1.2. See :ref:`release` for a full changelog
77
including other versions of pandas.
@@ -23,7 +23,8 @@ Fixed regressions
2323
- Regression in :meth:`DataFrame.replace` where a ``TypeError`` would be raised when attempting to replace elements of type :class:`Interval` (:issue:`35931`)
2424
- Fix regression in pickle roundtrip of the ``closed`` attribute of :class:`IntervalIndex` (:issue:`35658`)
2525
- Fixed regression in :meth:`DataFrameGroupBy.agg` where a ``ValueError: buffer source array is read-only`` would be raised when the underlying array is read-only (:issue:`36014`)
26-
-
26+
- Fixed regression in :meth:`Series.groupby.rolling` number of levels of :class:`MultiIndex` in input was compressed to one (:issue:`36018`)
27+
- Fixed regression in :class:`DataFrameGroupBy` on an empty :class:`DataFrame` (:issue:`36197`)
2728

2829
.. ---------------------------------------------------------------------------
2930
@@ -41,6 +42,8 @@ Bug fixes
4142
- Bug in :meth:`Series.dt.isocalendar` and :meth:`DatetimeIndex.isocalendar` that returned incorrect year for certain dates (:issue:`36032`)
4243
- Bug in :class:`DataFrame` indexing returning an incorrect :class:`Series` in some cases when the series has been altered and a cache not invalidated (:issue:`33675`)
4344
- Bug in :meth:`DataFrame.corr` causing subsequent indexing lookups to be incorrect (:issue:`35882`)
45+
- Bug in :meth:`import_optional_dependency` returning incorrect package names in cases where package name is different from import name (:issue:`35948`)
46+
- Bug when setting empty :class:`DataFrame` column to a :class:`Series` in preserving name of index in frame (:issue:`31368`)
4447

4548
.. ---------------------------------------------------------------------------
4649
@@ -49,6 +52,7 @@ Bug fixes
4952
Other
5053
~~~~~
5154
- :meth:`factorize` now supports ``na_sentinel=None`` to include NaN in the uniques of the values and remove ``dropna`` keyword which was unintentionally exposed to public facing API in 1.1 version from :meth:`factorize` (:issue:`35667`)
55+
- :meth:`DataFrame.plot` and :meth:`Series.plot` raise ``UserWarning`` about usage of ``FixedFormatter`` and ``FixedLocator`` (:issue:`35684` and :issue:`35945`)
5256

5357
.. ---------------------------------------------------------------------------
5458
@@ -57,4 +61,4 @@ Other
5761
Contributors
5862
~~~~~~~~~~~~
5963

60-
.. contributors:: v1.1.1..v1.1.2|HEAD
64+
.. contributors:: v1.1.1..v1.1.2

doc/source/whatsnew/v1.1.3.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. _whatsnew_113:
2+
3+
What's new in 1.1.3 (??)
4+
------------------------
5+
6+
These are the changes in pandas 1.1.3. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
{{ header }}
10+
11+
.. ---------------------------------------------------------------------------
12+
13+
.. _whatsnew_113.regressions:
14+
15+
Fixed regressions
16+
~~~~~~~~~~~~~~~~~
17+
-
18+
19+
.. ---------------------------------------------------------------------------
20+
21+
.. _whatsnew_113.bug_fixes:
22+
23+
Bug fixes
24+
~~~~~~~~~
25+
-
26+
27+
.. ---------------------------------------------------------------------------
28+
29+
.. _whatsnew_113.other:
30+
31+
Other
32+
~~~~~
33+
-
34+
35+
.. ---------------------------------------------------------------------------
36+
37+
.. _whatsnew_113.contributors:
38+
39+
Contributors
40+
~~~~~~~~~~~~
41+
42+
.. contributors:: v1.1.2..v1.1.3|HEAD

doc/source/whatsnew/v1.2.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ Datetimelike
228228
- Bug in :class:`DateOffset` where attributes reconstructed from pickle files differ from original objects when input values exceed normal ranges (e.g months=12) (:issue:`34511`)
229229
- Bug in :meth:`DatetimeIndex.get_slice_bound` where ``datetime.date`` objects were not accepted or naive :class:`Timestamp` with a tz-aware :class:`DatetimeIndex` (:issue:`35690`)
230230
- Bug in :meth:`DatetimeIndex.slice_locs` where ``datetime.date`` objects were not accepted (:issue:`34077`)
231+
- Bug in :meth:`DatetimeIndex.searchsorted`, :meth:`TimedeltaIndex.searchsorted`, and :meth:`Series.searchsorted` with ``datetime64`` or ``timedelta64`` dtype placement of ``NaT`` values being inconsistent with ``NumPy`` (:issue:`36176`)
231232

232233
Timedelta
233234
^^^^^^^^^
@@ -244,7 +245,7 @@ Timezones
244245

245246
Numeric
246247
^^^^^^^
247-
-
248+
- Bug in :func:`to_numeric` where float precision was incorrect (:issue:`31364`)
248249
-
249250

250251
Conversion
@@ -300,7 +301,6 @@ Plotting
300301
^^^^^^^^
301302

302303
- Bug in :meth:`DataFrame.plot` where a marker letter in the ``style`` keyword sometimes causes a ``ValueError`` (:issue:`21003`)
303-
- meth:`DataFrame.plot` and meth:`Series.plot` raise ``UserWarning`` about usage of FixedFormatter and FixedLocator (:issue:`35684` and :issue:`35945`)
304304

305305
Groupby/resample/rolling
306306
^^^^^^^^^^^^^^^^^^^^^^^^

pandas/_libs/src/parse_helper.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ int to_double(char *item, double *p_value, char sci, char decimal,
1818
char *p_end = NULL;
1919
int error = 0;
2020

21-
*p_value = xstrtod(item, &p_end, decimal, sci, '\0', 1, &error, maybe_int);
21+
/* Switch to precise xstrtod GH 31364 */
22+
*p_value = precise_xstrtod(item, &p_end, decimal, sci, '\0', 1,
23+
&error, maybe_int);
2224

2325
return (error == 0) && (!*p_end);
2426
}

pandas/compat/_optional.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
"numba": "0.46.0",
3434
}
3535

36+
# A mapping from import name to package name (on PyPI) for packages where
37+
# these two names are different.
38+
39+
INSTALL_MAPPING = {
40+
"bs4": "beautifulsoup4",
41+
"bottleneck": "Bottleneck",
42+
"lxml.etree": "lxml",
43+
"odf": "odfpy",
44+
"pandas_gbq": "pandas-gbq",
45+
"sqlalchemy": "SQLAlchemy",
46+
"jinja2": "Jinja2",
47+
}
48+
3649

3750
def _get_version(module: types.ModuleType) -> str:
3851
version = getattr(module, "__version__", None)
@@ -82,9 +95,13 @@ def import_optional_dependency(
8295
is False, or when the package's version is too old and `on_version`
8396
is ``'warn'``.
8497
"""
98+
99+
package_name = INSTALL_MAPPING.get(name)
100+
install_name = package_name if package_name is not None else name
101+
85102
msg = (
86-
f"Missing optional dependency '{name}'. {extra} "
87-
f"Use pip or conda to install {name}."
103+
f"Missing optional dependency '{install_name}'. {extra} "
104+
f"Use pip or conda to install {install_name}."
88105
)
89106
try:
90107
module = importlib.import_module(name)

0 commit comments

Comments
 (0)