def fromCSV(cls, data, fields):
if data[-1] == "\n":
data = data[:-1]
return cls.fromlist(list(csv.reader([data]))[0], fields)
@classmethod
def fromlist(cls, data, fields):
After Change
// If Python 2, decode back to unicode (the original input format).
if six.PY2:
for line in parsed_csv_lines:
parsed_csv_line = [six.text_type(col, "utf-8")for col in line]
break
else:
parsed_csv_line = list(parsed_csv_lines)[0]