标签: python pandas postgresql timezone psycopg2
我正在使用PostgreSQL来存储带有时区信息的时间戳。使用pandas.read_sql()从python查询时,这些时间戳将作为datetime.datetime对象以psinfocopg2.dt.fixedoffsettimezone(...)的tzinfo返回。有什么方法可以将这些日期时间返回或有效地转换为熊猫时间戳,以便可以使用熊猫功能轻松地对其进行操作?