Skip to content

Commit f85cdfd

Browse files
mpenkovjreback
authored andcommitted
14350 (#18380)
1 parent a840356 commit f85cdfd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

doc/source/whatsnew/v0.22.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Other Enhancements
2727
- :func:`MultiIndex.unique` now supports the ``level=`` argument, to get unique values from a specific index level (:issue:`17896`)
2828
- :class:`pandas.io.formats.style.Styler` now has method ``hide_index()`` to determine whether the index will be rendered in ouptut (:issue:`14194`)
2929
- :class:`pandas.io.formats.style.Styler` now has method ``hide_columns()`` to determine whether columns will be hidden in output (:issue:`14194`)
30+
- Improved wording of ValueError raised in :func:`Timestamp.tz_localize` function
3031

3132
.. _whatsnew_0220.api_breaking:
3233

pandas/_libs/tslib.pyx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1445,10 +1445,8 @@ cpdef array_with_unit_to_datetime(ndarray values, unit, errors='coerce'):
14451445
else:
14461446

14471447
if is_raise:
1448-
raise ValueError("non convertible value {0}"
1449-
"with the unit '{1}'".format(
1450-
val,
1451-
unit))
1448+
raise ValueError("unit='{0}' not valid with non-numerical "
1449+
"val='{1}'".format(unit, val))
14521450
if is_ignore:
14531451
raise AssertionError
14541452

0 commit comments

Comments
 (0)