import csv
import simplekml
import pandas as pd
import glob
frame = pd.DataFrame()
filelist=glob.glob('/Users/germanportes/Documents/Status_Report/Telework_training/Anomaly_6/files/*.csv')
kml = simplekml.Kml()
for file in filelist:
a6 =pd.read_csv(file)
for row in a6:
kml.newpoint(name=a6['idfa'], description = a6['device_os'],coords = [(a6['longitude'], a6['latitude'])])
kml.save('/Users/germanportes/Documents/Status_Report/Telework_training/Anomaly_6/files/kml/'+str(a6)+'.csv')
i like to save each individual csv as its own kml using the filename
Here you're iterating over the columns instead of the rows and then you pass
pandas.Seriesas columns tokml.newpointarguments instead of some values. Use DataFrame.apply() to iterate over the dataframe rows and add a point per each row to your kml object as follows: