<reponame>Floodnut/tools
import pandas
import numpy as np

data = pandas.read_csv('./light.csv',header=0)
#data = pandas.read_csv('./selight.csv',header=0)
#data = pandas.read_csv('./cctv.csv',header=0)

print("LOCK TABLES `safepos` WRITE;\nINSERT INTO `safepos`(type,name,lati, longi) VALUES")

name = data.iloc[:,0].values
lati = data.iloc[:,4].values
longi = data.iloc[:,5].values
    

#파일 확인하기
for i in range(len(lati)):
    if not np.isnan(lati[i]) and not np.isnan(longi[i]):
        print(f'(3,"",{lati[i]},{longi[i]}),')

print("UNLOCK TABLES;")
import pandas
import numpy as np

data = pandas.read_csv('./light.csv',header=0)
#data = pandas.read_csv('./selight.csv',header=0)
#data = pandas.read_csv('./cctv.csv',header=0)

print("LOCK TABLES `safepos` WRITE;\nINSERT INTO `safepos`(type,name,lati, longi) VALUES")

name = data.iloc[:,0].values
lati = data.iloc[:,4].values
longi = data.iloc[:,5].values
    

#파일 확인하기
for i in range(len(lati)):
    if not np.isnan(lati[i]) and not np.isnan(longi[i]):
        print(f'(3,"",{lati[i]},{longi[i]}),')

print("UNLOCK TABLES;")
#data = pandas.read_csv('./selight.csv',header=0) #data = pandas.read_csv('./cctv.csv',header=0) #파일 확인하기