Skip to content

Commit 3c8841a

Browse files
committed
ERR: more informative message on invalid Timestamp input
1 parent 748000d commit 3c8841a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tslib.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,8 @@ cdef convert_to_tsobject(object ts, object tz, object unit,
15391539
"Cannot convert Period to Timestamp "
15401540
"unambiguously. Use to_timestamp")
15411541
else:
1542-
raise TypeError('Cannot convert input to Timestamp')
1542+
raise TypeError('Cannot convert input [{}] of type {} to '
1543+
'Timestamp'.format(ts, type(ts)))
15431544

15441545
if obj.value != NPY_NAT:
15451546
_check_dts_bounds(&obj.dts)

0 commit comments

Comments
 (0)