def to_utc(df):
try:<EOL><INDENT>df.index = df.index.tz_localize('<STR_LIT>')<EOL><DEDENT>except TypeError:<EOL><INDENT>df.index = df.index.tz_convert('<STR_LIT>')<EOL><DEDENT>return df<EOL>
For use in tests; applied UTC timestamp to DataFrame.