Skip to content

Commit b999a8a

Browse files
committed
Merge branch 'excel-infinity-fix' of https://github.com/maxchang/pandas into maxchang-excel-infinity-fix
2 parents 07bdfb8 + 6644f8b commit b999a8a

File tree

3 files changed

+10
-30
lines changed

3 files changed

+10
-30
lines changed

doc/source/v0.15.0.txt

+4-28
Original file line numberDiff line numberDiff line change
@@ -396,29 +396,6 @@ For full docs, see the :ref:`Categorical introduction <categorical>` and the
396396
only. If you want to manipulate codes, please use one of the
397397
:ref:`API methods on Categoricals <api.categorical>`.
398398

399-
400-
401-
402-
403-
404-
405-
406-
407-
408-
409-
410-
411-
412-
413-
414-
415-
416-
417-
418-
- Bug in checking of table name in ``read_sql`` in certain cases (:issue:`7826`).
419-
420-
421-
422399
.. _whatsnew_0150.prior_deprecations:
423400

424401
Prior Version Deprecations/Changes
@@ -554,6 +531,8 @@ There are no experimental changes in 0.15.0
554531

555532
Bug Fixes
556533
~~~~~~~~~
534+
535+
- Bug in checking of table name in ``read_sql`` in certain cases (:issue:`7826`).
557536
- Bug in multiindexes dtypes getting mixed up when DataFrame is saved to SQL table (:issue:`8021`)
558537
- Bug in Series 0-division with a float and integer operand dtypes (:issue:`7785`)
559538
- Bug in ``Series.astype("unicode")`` not calling ``unicode`` on the values correctly (:issue:`7758`)
@@ -634,13 +613,10 @@ Bug Fixes
634613
return a non scalar value that appeared valid but wasn't (:issue:`7870`).
635614
- Bug in ``date_range()``/``DatetimeIndex()`` when the timezone was inferred from input dates yet incorrect
636615
times were returned when crossing DST boundaries (:issue:`7835`, :issue:`7901`).
637-
638-
616+
- Bug in ``to_excel()`` where a negative sign was being prepended to positive infinity and was absent for negative infinity (:issue`7949`)
639617
- Bug in area plot draws legend with incorrect ``alpha`` when ``stacked=True`` (:issue:`8027`)
640-
641618
- ``Period`` and ``PeriodIndex`` addition/subtraction with ``np.timedelta64`` results in incorrect internal representations (:issue:`7740`)
642-
643-
- ``Holiday`` bug in Holiday with no offset or observance (:issue:`7987`)
619+
- Bug in ``Holiday`` with no offset or observance (:issue:`7987`)
644620

645621
- Bug in ``DataFrame.to_latex`` formatting when columns or index is a ``MultiIndex`` (:issue:`7982`).
646622

pandas/core/format.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1512,9 +1512,9 @@ def _format_value(self, val):
15121512
val = self.na_rep
15131513
elif com.is_float(val):
15141514
if np.isposinf(val):
1515-
val = '-%s' % self.inf_rep
1516-
elif np.isneginf(val):
15171515
val = self.inf_rep
1516+
elif np.isneginf(val):
1517+
val = '-%s' % self.inf_rep
15181518
elif self.float_format is not None:
15191519
val = float(self.float_format % val)
15201520
return val

pandas/src/testing.pyx

+4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ cpdef assert_almost_equal(a, b, bint check_less_precise=False):
122122

123123
if np.isinf(a):
124124
assert np.isinf(b), "First object is inf, second isn't"
125+
if np.isposinf(a):
126+
assert np.isposinf(b), "First object is positive inf, second is negative inf"
127+
else:
128+
assert np.isneginf(b), "First object is negative inf, second is positive inf"
125129
else:
126130
fa, fb = a, b
127131

0 commit comments

Comments
 (0)