Converting everything to lowercase

Ignore upper- or lowercase from csv-file - as the code translates to lowercase in poc.csv all entries will be switched to lowercase.
This commit is contained in:
Florian 2017-04-28 23:49:44 +02:00 committed by GitHub
parent 4e23d9856e
commit 418411e09c

View file

@ -45,6 +45,10 @@ def loadCSV(typ, idField):
# only import rows with an integer as id, allow subrics though
if re.match("^[0-9]+[A-D]?$", row[idField], re.IGNORECASE):
try:
if len(row[idField]) > 7:
if row[idField][7].isupper():
tmp = row[idField].lower()
row[idField] = tmp;
resultList[row[idField]] = stringConverter.convertToUTF8(row['description'])
except:
# skip entry in case of an exception