-1
filename = 'result'
column = 'Latitude'
os.system("wget http://earthquake.usgs.gov/earthquakes/feed/csv/1.0/hour")
#csv_data = csv.reader(downloaded_data)
file = csv.reader(open('/home/coperthought/Documents/hour' , 'rb'), delimiter='\t')
data = [] # This will contain our data
# Create a csv reader object to iterate through the file
reader = csv.reader(open('/home/coperthought/Documents/hour' , 'rU'), delimiter=',', dialect='excel')
hrow = reader.next() # Get the top row
idx = hrow.index(column) # Find the column of the data you're looking for
for row in reader: # Iterate the remaining rows
data.append(row[idx])
os.remove ('/home/coperthought/Documents/hour')
print data
那麼數據是獲取列表轉換爲字符串
['63.190', '63.730', '59.935', '38.805', '61.416', '63.213']
我怎麼能進入一個字符串這一點。加入是一個..
感謝
你在Python中的代碼? – alex
並歡迎來到stackoverflow。請使用編輯器的格式選項將您的代碼放入可讀的問題中。 – alex
如果你解釋了你曾經嘗試過的以及如何或爲什麼不起作用,這將有助於你的事業 –