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
@@ -60,7 +60,7 @@ def _maybe_cache(arg, format, cache, convert_listlike):
6060 return cache_array
6161
6262
63- def _box_if_needed (dt_array , box , default , tz , name ):
63+ def _box_if_needed (dt_array , box , default , tz , name = None ):
6464 """
6565 Properly boxes the ndarray of datetimes (if requested) to DatetimeIndex
6666 if it is possible or to generic Index instead
@@ -86,7 +86,6 @@ def _box_if_needed(dt_array, box, default, tz, name):
8686 """
8787 if box :
8888 from pandas import DatetimeIndex , Index
89- print (type (dt_array ))
9089 if is_datetime64_dtype (dt_array ):
9190 return DatetimeIndex (dt_array , tz = tz , name = name )
9291 # e.g. an Index of datetime objects
0 commit comments