@classmethod<EOL><INDENT>def _to_timestamp(cls, column):<DEDENT>
<EOL>try:<EOL><INDENT>column = pd.to_datetime(column)<EOL><DEDENT>except ValueError:<EOL><INDENT>log = LoggingMixin().log<EOL>log.warning("<STR_LIT>", column.name)<EOL>return column<EOL><DEDENT>converted = []<EOL>for value in column:<EOL><INDENT>try:<EOL><INDENT>converted.append(value.timestamp())<EOL><DEDENT>except (ValueError, AttributeError):<EOL><INDENT>converted.append(pd.np.NaN)<EOL><DEDENT><DEDENT>return pd.Series(converted, index=column.index)<EOL>
Convert a column of a dataframe to UNIX timestamps if applicable

:param column: A Series object representing a column of a dataframe.
:type column: pd.Series
:return: a new series that maintains the same index as the original
:rtype: pd.Series