14
14
from pandas .core .dtypes .common import (
15
15
ensure_object , is_datetime64_dtype , is_datetime64_ns_dtype ,
16
16
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 )
18
18
from pandas .core .dtypes .generic import ABCDataFrame , ABCIndexClass , ABCSeries
19
19
from pandas .core .dtypes .missing import notna
20
20
@@ -60,7 +60,7 @@ def _maybe_cache(arg, format, cache, convert_listlike):
60
60
return cache_array
61
61
62
62
63
- def _box_if_needed (dt_array , box , default , tz , name ):
63
+ def _box_if_needed (dt_array , box , default , tz , name = None ):
64
64
"""
65
65
Properly boxes the ndarray of datetimes (if requested) to DatetimeIndex
66
66
if it is possible or to generic Index instead
@@ -86,7 +86,6 @@ def _box_if_needed(dt_array, box, default, tz, name):
86
86
"""
87
87
if box :
88
88
from pandas import DatetimeIndex , Index
89
- print (type (dt_array ))
90
89
if is_datetime64_dtype (dt_array ):
91
90
return DatetimeIndex (dt_array , tz = tz , name = name )
92
91
# e.g. an Index of datetime objects
0 commit comments