0

The odo documentation is quite sparse, it does not explain how to pass further parameters when, say loading a csv file. For example, how do I tell odo that the file is latin1 encoded?

data=[]
odo('mylatin1.csv',data)
Hexatonic
  • 2,251
  • 2
  • 21
  • 26

1 Answers1

1

Try using the encoding keyword argument:

data = []
odo('mylatin1.csv', data, encoding='latin1')

Alternatively, try specifying the encoding using odo.resource:

from odo import resource

my_csv = resource('mylatin1.csv', encoding='latin1')
data = []
odo(my_csv, data)
root
  • 32,715
  • 6
  • 74
  • 87