import utm
st = read('*.SHZ', format='SAC')
df = pd.DataFrame(columns=['name','x','y','z'])
name = []
x = []
y = []
for i in range(len(st)):
stla = st[i].stats.sac.stla
stlo = st[i].stats.sac.stlo
utm_ = utm.from_latlon(stla,stlo)
stationname = st[i].stats.station
utm_x = utm_[0]
utm_y = utm_[1]
x.append(utm_x)
y.append(utm_y)
name.append(stationname)
# utm.from_latlon(st[i].stats.sac.stla,st[i].stats.sac.stlo)[0]
df['name'] = name
df['x'] = x
df['y'] = y
df['z'] = [0]*len(x)
df.to_csv('coordinate.txt', sep=' ', header=None, index=None)