Osgeo.ogr seems not able to correctly get the field name of a csv file. Take this example:
Identifian,C,254;CodeVoieRi,C,254;CodeInseeI,N,10,0
1;;13021
2;;13021
3;;13021
The problem is that ogr take the "," and the ";" as delimiters while the "," are just part of the column name.
Here is the python code i use:
dataSource = ogr.Open(file)
daLayer = dataSource.GetLayer(0)
layerDefinition = daLayer.GetLayerDefn()
for i in range(layerDefinition.GetFieldCount()):
name = layerDefinition.GetFieldDefn(i).GetName()
Is it possible to specify to ogr to use a single delimiter?
Thanks!