#NEWLINE# def to_perioddelta( self , freq ) : #NEWLINE# #INDENT# '\n        Calcuates TimedeltaIndex of difference between index\n        values and index converted to PeriodIndex at specified\n        freq.  Used for vectorized offsets\n\n        .. versionadded:: 0.17.0\n\n        Parameters\n        ----------\n        freq : Period frequency\n\n        Returns\n        -------\n        y : TimedeltaIndex\n        ' #NEWLINE# return to_timedelta ( ( self . asi8 - self . to_period ( freq ) . to_timestamp ( ) . asi8 ) )