Problems opening DBF files in python

前端 未结 2 2039
礼貌的吻别
礼貌的吻别 2021-01-14 05:49

I am trying to open en transform several DBF files to a dataframe. Most of them worked fine, but for one of the files I receive the error: \"UnicodeDecodeError: \'utf-8\' co

2条回答
  •  [愿得一人]
    2021-01-14 06:43

     from simpledbf import Dbf5
     dbf2 = Dbf5('/Users/.../TCAT_MUNICIPIOS.dbf', codec='latin')
     df2 = dbf2.to_dataframe()
     df2.head(3)
    

提交回复
热议问题