Save pandas (string/object) column as VARCHAR in Oracle DB instead of CLOB (default behaviour)

前端 未结 2 551
情深已故
情深已故 2021-01-18 03:08

i am trying to transfer a dataframe to oracle database, but the transfer is taking too long, because the datatype of the variable is showing as clob in orac

2条回答
  •  轮回少年
    2021-01-18 04:04

    use str.zfill

    df['product'].astype(str).str.zfill(9)
    
    0    000012320
    1    000234234
    Name: product, dtype: object
    

提交回复
热议问题