How to load sample dataset in Pandas

This code loads an example dataset in Pandas but requires an internet connection:

iris-example.py
import pandas as pd
iris = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')

This is how the iris dataset looks like:

For a more detailed answer with other options on how to import example datasets, see this StackOverflow post.


Check out similar posts by category: Pandas, Python