Sometimes, the data is directly available as a URL. In such cases, read_csv can be directly used to read from these URLs:
pd.read_csv('http://bit.ly/2cLzoxH').head()
Alternatively, to work with URLs in order to get data, we can use a couple of Python packages that we haven't used so far, such as .csv and .urllib. It would suffice to know that .csv provides a range of methods for handling .csv files and that urllib is used to navigate to and access information from the URL. Here is how we can do this:
import csv import urllib2 url='http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data' response=urllib2.urlopen(url) cr=csv.reader(response) for rows in cr: print rows
AWS S3 is a popular file-sharing and storage repository on the web. Many enterprises store their business operations data as files on S3, which needs...