Pandas: transform a dbf Table into a dataframe

后端 未结 5 1056
后悔当初
后悔当初 2021-02-12 15:59

I want to read a dbf file of an ArcGIS shapefile and dump it into a pandas dataframe. I am currently using the dbf package.

I have apparently b

5条回答
  •  不知归路
    2021-02-12 16:42

    You should have a look at simpledbf:

    In [2]: import pandas as pd
    
    In [3]: from simpledbf import Dbf5
    
    In [4]: dbf = Dbf5('test.dbf')
    
    In [5]: df = dbf.to_dataframe()
    

    This works for me with a little sample .dbf file. Hope that helps.

提交回复
热议问题