Skip to content

Commit aae2f94

Browse files
Merge remote-tracking branch 'upstream/master' into pandas-devgh-27081
2 parents 365362a + 911e19b commit aae2f94

Some content is hidden

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

52 files changed

+359
-223
lines changed

ci/deps/azure-36-minimum_versions.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.6.1
@@ -19,12 +18,12 @@ dependencies:
1918
- jinja2=2.8
2019
- numba=0.46.0
2120
- numexpr=2.6.2
22-
- numpy=1.13.3
21+
- numpy=1.15.4
2322
- openpyxl=2.5.7
2423
- pytables=3.4.3
2524
- python-dateutil=2.7.3
2625
- pytz=2017.2
27-
- scipy=0.19.0
26+
- scipy=1.2
2827
- xlrd=1.1.0
2928
- xlsxwriter=0.9.8
3029
- xlwt=1.2.0

ci/deps/azure-macos-36.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- matplotlib=2.2.3
2020
- nomkl
2121
- numexpr
22-
- numpy=1.14
22+
- numpy=1.15.4
2323
- openpyxl
2424
- pyarrow>=0.13.0
2525
- pytables

conda.recipe/meta.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ requirements:
2020
- cython
2121
- numpy
2222
- setuptools >=3.3
23-
- python-dateutil >=2.5.0
23+
- python-dateutil >=2.7.3
2424
- pytz
2525
run:
2626
- python {{ python }}
2727
- {{ pin_compatible('numpy') }}
28-
- python-dateutil >=2.5.0
28+
- python-dateutil >=2.7.3
2929
- pytz
3030

3131
test:

doc/source/getting_started/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Dependencies
220220
Package Minimum supported version
221221
================================================================ ==========================
222222
`setuptools <https://setuptools.readthedocs.io/en/latest/>`__ 24.2.0
223-
`NumPy <https://www.numpy.org>`__ 1.13.3
223+
`NumPy <https://www.numpy.org>`__ 1.15.4
224224
`python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__ 2.7.3
225225
`pytz <https://pypi.org/project/pytz/>`__ 2017.2
226226
================================================================ ==========================

doc/source/whatsnew/v1.1.0.rst

+19-5
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,23 @@ Other enhancements
157157
Increased minimum versions for dependencies
158158
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159159

160-
Some minimum supported versions of dependencies were updated (:issue:`29766`, :issue:`29723`, pytables >= 3.4.3).
160+
Some minimum supported versions of dependencies were updated (:issue:`33718`, :issue:`29766`, :issue:`29723`, pytables >= 3.4.3).
161161
If installed, we now require:
162162

163163
+-----------------+-----------------+----------+---------+
164164
| Package | Minimum Version | Required | Changed |
165165
+=================+=================+==========+=========+
166-
| python-dateutil | 2.7.3 | X | |
166+
| numpy | 1.15.4 | X | X |
167+
+-----------------+-----------------+----------+---------+
168+
| pytz | 2015.4 | X | |
169+
+-----------------+-----------------+----------+---------+
170+
| python-dateutil | 2.7.3 | X | X |
171+
+-----------------+-----------------+----------+---------+
172+
| bottleneck | 1.2.1 | | |
173+
+-----------------+-----------------+----------+---------+
174+
| numexpr | 2.6.2 | | |
175+
+-----------------+-----------------+----------+---------+
176+
| pytest (dev) | 4.0.2 | | |
167177
+-----------------+-----------------+----------+---------+
168178

169179
For `optional libraries <https://dev.pandas.io/docs/install.html#dependencies>`_ the general recommendation is to use the latest version.
@@ -195,7 +205,7 @@ Optional libraries below the lowest tested version may still work, but are not c
195205
+-----------------+-----------------+---------+
196206
| s3fs | 0.3.0 | |
197207
+-----------------+-----------------+---------+
198-
| scipy | 0.19.0 | |
208+
| scipy | 1.2.0 | X |
199209
+-----------------+-----------------+---------+
200210
| sqlalchemy | 1.1.4 | |
201211
+-----------------+-----------------+---------+
@@ -487,6 +497,7 @@ Deprecations
487497
arguments (:issue:`27573`).
488498

489499
- :func:`pandas.api.types.is_categorical` is deprecated and will be removed in a future version; use `:func:pandas.api.types.is_categorical_dtype` instead (:issue:`33385`)
500+
- :meth:`Index.get_value` is deprecated and will be removed in a future version (:issue:`19728`)
490501

491502
.. ---------------------------------------------------------------------------
492503
@@ -546,6 +557,7 @@ Datetimelike
546557
- Bug in :meth:`DatetimeIndex.intersection` losing ``freq`` and timezone in some cases (:issue:`33604`)
547558
- Bug in :class:`DatetimeIndex` addition and subtraction with some types of :class:`DateOffset` objects incorrectly retaining an invalid ``freq`` attribute (:issue:`33779`)
548559
- Bug in :class:`DatetimeIndex` where setting the ``freq`` attribute on an index could silently change the ``freq`` attribute on another index viewing the same data (:issue:`33552`)
560+
- Bug in :meth:`DatetimeIndex.intersection` and :meth:`TimedeltaIndex.intersection` with results not having the correct ``name`` attribute (:issue:`33904`)
549561

550562
Timedelta
551563
^^^^^^^^^
@@ -571,6 +583,7 @@ Numeric
571583
- Bug in :meth:`DataFrame.mean` with ``numeric_only=False`` and either ``datetime64`` dtype or ``PeriodDtype`` column incorrectly raising ``TypeError`` (:issue:`32426`)
572584
- Bug in :meth:`DataFrame.count` with ``level="foo"`` and index level ``"foo"`` containing NaNs causes segmentation fault (:issue:`21824`)
573585
- Bug in :meth:`DataFrame.diff` with ``axis=1`` returning incorrect results with mixed dtypes (:issue:`32995`)
586+
- Bug in DataFrame reductions using ``numeric_only=True`` and ExtensionArrays (:issue:`33256`).
574587
- Bug in :meth:`DataFrame.corr` and :meth:`DataFrame.cov` raising when handling nullable integer columns with ``pandas.NA`` (:issue:`33803`)
575588
- Bug in :class:`DataFrame` and :class:`Series` addition and subtraction between object-dtype objects and ``datetime64`` dtype objects (:issue:`33824`)
576589

@@ -723,6 +736,7 @@ Reshaping
723736
- Bug in :meth:`concat` where when passing a non-dict mapping as ``objs`` would raise a ``TypeError`` (:issue:`32863`)
724737
- :meth:`DataFrame.agg` now provides more descriptive ``SpecificationError`` message when attempting to aggregating non-existant column (:issue:`32755`)
725738
- Bug in :meth:`DataFrame.unstack` when MultiIndexed columns and MultiIndexed rows were used (:issue:`32624`, :issue:`24729` and :issue:`28306`)
739+
- Bug in :func:`concat` was not allowing for concatenation of ``DataFrame`` and ``Series`` with duplicate keys (:issue:`33654`)
726740
- Bug in :func:`cut` raised an error when non-unique labels (:issue:`33141`)
727741

728742

@@ -735,8 +749,8 @@ Sparse
735749
ExtensionArray
736750
^^^^^^^^^^^^^^
737751

738-
- Fixed bug where :meth:`Series.value_counts` would raise on empty input of ``Int64`` dtype (:issue:`33317`)
739-
-
752+
- Fixed bug where :meth:`Serires.value_counts` would raise on empty input of ``Int64`` dtype (:issue:`33317`)
753+
- Fixed bug that caused :meth:`Series.__repr__()` to crash for extension types whose elements are multidimensional arrays (:issue:`33770`).
740754

741755

742756
Other

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ dependencies:
7575
- jinja2 # pandas.Styler
7676
- matplotlib>=2.2.2 # pandas.plotting, Series.plot, DataFrame.plot
7777
- numexpr>=2.6.8
78-
- scipy>=1.1
78+
- scipy>=1.2
7979
- numba>=0.46.0
8080

8181
# optional for io

pandas/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
# numpy compat
2222
from pandas.compat.numpy import (
23-
_np_version_under1p14,
24-
_np_version_under1p15,
2523
_np_version_under1p16,
2624
_np_version_under1p17,
2725
_np_version_under1p18,

pandas/_libs/lib.pyx

+1-5
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def array_equivalent_object(left: object[:], right: object[:]) -> bool:
589589
except TypeError as err:
590590
# Avoid raising TypeError on tzawareness mismatch
591591
# TODO: This try/except can be removed if/when Timestamp
592-
# comparisons are change dto match datetime, see GH#28507
592+
# comparisons are changed to match datetime, see GH#28507
593593
if "tz-naive and tz-aware" in str(err):
594594
return False
595595
raise
@@ -2346,8 +2346,6 @@ def map_infer_mask(ndarray arr, object f, const uint8_t[:] mask, bint convert=Tr
23462346

23472347
if cnp.PyArray_IsZeroDim(val):
23482348
# unbox 0-dim arrays, GH#690
2349-
# TODO: is there a faster way to unbox?
2350-
# item_from_zerodim?
23512349
val = val.item()
23522350

23532351
result[i] = val
@@ -2388,8 +2386,6 @@ def map_infer(ndarray arr, object f, bint convert=True):
23882386

23892387
if cnp.PyArray_IsZeroDim(val):
23902388
# unbox 0-dim arrays, GH#690
2391-
# TODO: is there a faster way to unbox?
2392-
# item_from_zerodim?
23932389
val = val.item()
23942390

23952391
result[i] = val

pandas/_libs/tslibs/timedeltas.pyx

-8
Original file line numberDiff line numberDiff line change
@@ -1516,10 +1516,6 @@ class Timedelta(_Timedelta):
15161516

15171517
def __rmod__(self, other):
15181518
# Naive implementation, room for optimization
1519-
if hasattr(other, 'dtype') and other.dtype.kind == 'i':
1520-
# TODO: Remove this check with backwards-compat shim
1521-
# for integer / Timedelta is removed.
1522-
raise TypeError(f'Invalid dtype {other.dtype} for __mod__')
15231519
return self.__rdivmod__(other)[1]
15241520

15251521
def __divmod__(self, other):
@@ -1529,10 +1525,6 @@ class Timedelta(_Timedelta):
15291525

15301526
def __rdivmod__(self, other):
15311527
# Naive implementation, room for optimization
1532-
if hasattr(other, 'dtype') and other.dtype.kind == 'i':
1533-
# TODO: Remove this check with backwards-compat shim
1534-
# for integer / Timedelta is removed.
1535-
raise TypeError(f'Invalid dtype {other.dtype} for __mod__')
15361528
div = other // self
15371529
return div, other - div * self
15381530

pandas/compat/_optional.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"pytest": "5.0.1",
2222
"pyxlsb": "1.0.6",
2323
"s3fs": "0.3.0",
24-
"scipy": "0.19.0",
24+
"scipy": "1.2.0",
2525
"sqlalchemy": "1.1.4",
2626
"tables": "3.4.3",
2727
"tabulate": "0.8.3",

pandas/compat/numpy/__init__.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,17 @@
88
# numpy versioning
99
_np_version = np.__version__
1010
_nlv = LooseVersion(_np_version)
11-
_np_version_under1p14 = _nlv < LooseVersion("1.14")
12-
_np_version_under1p15 = _nlv < LooseVersion("1.15")
1311
_np_version_under1p16 = _nlv < LooseVersion("1.16")
1412
_np_version_under1p17 = _nlv < LooseVersion("1.17")
1513
_np_version_under1p18 = _nlv < LooseVersion("1.18")
1614
_is_numpy_dev = ".dev" in str(_nlv)
1715

1816

19-
if _nlv < "1.13.3":
17+
if _nlv < "1.15.4":
2018
raise ImportError(
21-
"this version of pandas is incompatible with numpy < 1.13.3\n"
19+
"this version of pandas is incompatible with numpy < 1.15.4\n"
2220
f"your numpy version is {_np_version}.\n"
23-
"Please upgrade numpy to >= 1.13.3 to use this pandas version"
21+
"Please upgrade numpy to >= 1.15.4 to use this pandas version"
2422
)
2523

2624

@@ -65,8 +63,6 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
6563
__all__ = [
6664
"np",
6765
"_np_version",
68-
"_np_version_under1p14",
69-
"_np_version_under1p15",
7066
"_np_version_under1p16",
7167
"_np_version_under1p17",
7268
"_is_numpy_dev",

0 commit comments

Comments
 (0)