@classmethod
def from_string(cls, s: str) ->'Timestamp':
    """
        Initialise instance from string.

        Parameters
        ----------
        s
            timestamp string

        Returns
        -------
        Timestamp
            new timestamp
        """
    for f in (cls.f_second, cls.f_microsecond):
        try:
            return cls.strptime(s, f)
        except ValueError:
            pass
    else:
        raise ValueError(f'Date `{s}` does not match accepted formats!')
