def clip_to_seconds ( m : Union [ int , pd . Series ] ) -> Union [ int , pd . Series ] : return m // pd . Timedelta ( 1 , unit = 's' ) . value
python series datetime to seconds
Clips UTC datetime in nanoseconds to seconds .
def clip_to_seconds(m: Union[int, pd.Series]) -> Union[int, pd.Series]:
        """Clips UTC datetime in nanoseconds to seconds."""
        return m // pd.Timedelta(1, unit='s').value