Unable to write data to Vertica Database using Python SqlAlchemy - Type “TEXT” does not exist

廉价感情. 提交于 2019-12-07 03:22:28
sidu

Have faced similar thing at work, and have changed types using VARCHAR for the columns which are of string object

def updateType(df_para):
    dtypedict = {}  # create and empty dictionary
    for i,j in zip(df_para.columns, df_para.dtypes):
        if "object" in str(j):
            dtypedict.update({i: sa.types.VARCHAR})

    return dtypedict

updatedict = updateType(df)  # update the datafraame type
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!