@Abbas, Vielen dank. In der Tat habe ich es Schritt für Schritt ausgeführt und hier ist, was ich gefunden habe. Nicht wirklich der schnellste, aber es funktioniert gut.
Ich lief es mit Pandas 0.18.1 auf Python 3.5.1 auf Mac
from zipfile import ZipFile
from urllib.request import urlopen
import pandas as pd
import os
URL = \
'http://data.octo.dc.gov/feeds/crime_incidents/archive/crime_incidents_2013_CSV.zip'
# open and save the zip file onto computer
url = urlopen(URL)
output = open('zipFile.zip', 'wb') # note the flag: "wb"
output.write(url.read())
output.close()
# read the zip file as a pandas dataframe
df = pd.read_csv('zipFile.zip') # pandas version 0.18.1 takes zip files
# if keeping on disk the zip file is not wanted, then:
os.remove(zipName) # remove the copy of the zipfile on disk
Ich hoffe, das hilft. Vielen Dank!
Was ist das Problem, vor dem Sie stehen? – Abbas