From 51a1a1e2cccf7c97ea627c9c06c9dddce44cab9f Mon Sep 17 00:00:00 2001 From: coelhudo Date: Fri, 9 Oct 2020 15:54:01 -0400 Subject: [PATCH] DOC: pandas.Index.astype says it raises ValueError instead of TypeError #37012 --- pandas/core/indexes/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 539f5515a2f8b..5056b5b82755c 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -652,7 +652,7 @@ def astype(self, dtype, copy=True): Create an Index with values cast to dtypes. The class of a new Index is determined by dtype. When conversion is - impossible, a ValueError exception is raised. + impossible, a TypeError exception is raised. Parameters ----------