My limited knowlegde suggests that if the error is not in line 16, then it will be an issue with the way the range is written, but I just have no idea what the fix would be. Line 16, in csv_f.write(regex_Time + "," + regex_Lat + "," + regex_Long + '\n') Red List Index IUCN Species Information Service (SIS) Reasons for Changing Category. \d\d\d\d\d\d\d\d\d\d\d\d\d.", str(data)) regex_Lat=re.findall(".latitude.: \d\d\d\d\d\d\d\d\d", str(data)) regex_Long=re.findall(".longitude.: -\d\d\d\d\d\d\d\d\d", str(data)) csv_f.write(regex_Time + "," + regex_Lat + "," + regex_Long+'\n') csv_f.close print('Done')īasically, when I run the script I get an error saying A taxon is presumed Extinct in the Wild when. ![]() With open(JSON_data) as f: data = json.load(f) csv_f=open(CSV_file, 'w')įor x in range(len(data)): regex_Time=re.findall(".timestampMs. JSON_data="C:/Users/JSON FILE PATH.txt" CSV_file="C:/Users/CSV FILE PATH.csv" ![]() Vista 676 veces 0 Tengo un query y ese query solo me arroja un registro y cuando lo optengo le pido que me arroje el el valor que este en la posicion 0 for a in datosestados. Formular una pregunta Formulada hace 5 años y 3 meses. Here is the script (I remembered to change lines 5 and 6 as needed) como puedo solucionarlo list index out of range. ![]() I have been trying to follow a blog post to turn Google location data from JSON to CSV. Solution using range() and len(): range() function returns a sequence of numbers starting from 0, and ends at the integer passed as a parameter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |