1414from pandas .core .dtypes .common import (
1515 ensure_object , is_datetime64_dtype , is_datetime64_ns_dtype ,
1616 is_datetime64tz_dtype , is_float , is_integer , is_integer_dtype ,
17- is_list_like , is_numeric_dtype , is_object_dtype , is_scalar )
17+ is_list_like , is_numeric_dtype , is_scalar )
1818from pandas .core .dtypes .generic import ABCDataFrame , ABCIndexClass , ABCSeries
1919from pandas .core .dtypes .missing import notna
2020
@@ -59,7 +59,7 @@ def _maybe_cache(arg, format, cache, convert_listlike):
5959 return cache_array
6060
6161
62- def _box_if_needed (dt_array , box , default , tz , name ):
62+ def _box_if_needed (dt_array , box , default , tz , name = None ):
6363 """
6464 Properly boxes the ndarray of datetimes (if requested) to DatetimeIndex
6565 if it is possible or to generic Index instead
@@ -85,7 +85,6 @@ def _box_if_needed(dt_array, box, default, tz, name):
8585 """
8686 if box :
8787 from pandas import DatetimeIndex , Index
88- print (type (dt_array ))
8988 if is_datetime64_dtype (dt_array ):
9089 return DatetimeIndex (dt_array , tz = tz , name = name )
9190 # e.g. an Index of datetime objects
0 commit comments