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
@@ -59,7 +59,7 @@ def _maybe_cache(arg, format, cache, convert_listlike):
59
59
return cache_array
60
60
61
61
62
- def _box_if_needed (dt_array , box , default , tz , name ):
62
+ def _box_if_needed (dt_array , box , default , tz , name = None ):
63
63
"""
64
64
Properly boxes the ndarray of datetimes (if requested) to DatetimeIndex
65
65
if it is possible or to generic Index instead
@@ -85,7 +85,6 @@ def _box_if_needed(dt_array, box, default, tz, name):
85
85
"""
86
86
if box :
87
87
from pandas import DatetimeIndex , Index
88
- print (type (dt_array ))
89
88
if is_datetime64_dtype (dt_array ):
90
89
return DatetimeIndex (dt_array , tz = tz , name = name )
91
90
# e.g. an Index of datetime objects
0 commit comments