55
66import numpy as np
77
8- from pandas ._libs import NaT , NaTType , Period , Timestamp , algos , iNaT , lib
9- from pandas ._libs .tslibs .resolution import Resolution
10- from pandas ._libs .tslibs .timedeltas import delta_to_nanoseconds
8+ from pandas ._libs import algos , lib
9+ from pandas ._libs .tslibs import (
10+ NaT ,
11+ NaTType ,
12+ Period ,
13+ Resolution ,
14+ Timestamp ,
15+ delta_to_nanoseconds ,
16+ iNaT ,
17+ )
1118from pandas ._libs .tslibs .timestamps import (
1219 RoundTo ,
1320 integer_op_not_supported ,
@@ -1103,7 +1110,7 @@ def inferred_freq(self):
11031110 return None
11041111
11051112 @property # NB: override with cache_readonly in immutable subclasses
1106- def _resolution (self ) -> Optional [Resolution ]:
1113+ def _resolution_obj (self ) -> Optional [Resolution ]:
11071114 try :
11081115 return Resolution .get_reso_from_freq (self .freqstr )
11091116 except KeyError :
@@ -1114,12 +1121,12 @@ def resolution(self) -> str:
11141121 """
11151122 Returns day, hour, minute, second, millisecond or microsecond
11161123 """
1117- if self ._resolution is None :
1124+ if self ._resolution_obj is None :
11181125 if is_period_dtype (self .dtype ):
11191126 # somewhere in the past it was decided we default to day
11201127 return "day"
11211128 # otherwise we fall through and will raise
1122- return Resolution .get_str (self ._resolution )
1129+ return Resolution .get_str (self ._resolution_obj )
11231130
11241131 @classmethod
11251132 def _validate_frequency (cls , index , freq , ** kwargs ):
0 commit comments