Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
将pyexasol import_from_pandas(df)用于df具有 datetime 列的 DataFrame 时,Exasol (6.2) 会引发错误,因为它无法解析数据框列的 ISO 格式字符串表示。具体来说,Exasol 无法解析“+00:00”最终字符。我目前的解决方法是将所有 pandas 日期时间列转换为字符串列,但这可能会花费大量时间。
import_from_pandas(df)
df
TIMESTAMP将 Pandas 数据帧中的日期时间列导入具有列类型的现有 Exasol 表的正确方法是什么?
TIMESTAMP
PyEXASOL 创建者在这里。
您可以使用import_params字典参数将附加参数传递给pandas.to_csv()内部使用的方法。其中一个参数是date_format。只需传递与 Exasol 兼容的正确格式。
import_params
pandas.to_csv()
date_format
我会考虑默认添加这个参数。
希望能帮助到你!