I'm just wondering how I can read a special field from a CVS file with the following structure:
40.0070222,116.2968604,2008-10-28,[["route"], ["sublocality","political"]] 39.9759505,116.3272935,2008-10-29,[["route"], ["establishment"], ["sublocality", "political"]]
way to read cvs files I worked with:
with open('routes/stayedStoppoints', 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter=',', quotechar='"')
The problem with this is the first 3 fields that I cannot use:
for row in spamreader:
line [0], line [1], line [2], I can access without problems. but in the last field, and I think that with csv.reader (csvfile, delimiter = ',', quotechar = '"') is also split for each sub-list:
so when I tried to access, just show me:
[["route"]
Anyone who has a solution to handle the last field has a complete list (the list is valid)
[["route"], ["sublocality","political"]]
to have access to each category.
thanks