File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -834,7 +834,46 @@ cdef class _Timedelta(timedelta):
834834
835835 @property
836836 def resolution (self ):
837- """ return a string representing the lowest resolution that we have """
837+ """
838+ Return a string representing the lowest timedelta resolution.
839+
840+ Each timedelta has a defined resolution that represents the lowest OR
841+ most granular level of precision. Each level of resolution is
842+ represented by a short string as defined below:
843+
844+ Resolution: Return value
845+
846+ * Days: 'D'
847+ * Hours: 'H'
848+ * Minutes: 'T'
849+ * Seconds: 'S'
850+ * Milliseconds: 'L'
851+ * Microseconds: 'U'
852+ * Nanoseconds: 'N'
853+
854+ Returns
855+ -------
856+ str
857+ Timedelta resolution.
858+
859+ Examples
860+ --------
861+ >>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
862+ >>> td.resolution
863+ 'N'
864+
865+ >>> td = pd.Timedelta('1 days 2 min 3 us')
866+ >>> td.resolution
867+ 'U'
868+
869+ >>> td = pd.Timedelta('2 min 3 s')
870+ >>> td.resolution
871+ 'S'
872+
873+ >>> td = pd.Timedelta(36, unit='us')
874+ >>> td.resolution
875+ 'U'
876+ """
838877
839878 self ._ensure_components()
840879 if self ._ns:
You can’t perform that action at this time.
0 commit comments