Four places to get a ready-made dataset into a DataFrame in a couple of lines.
Log scale: each tick is ten times the last. Start small with the built-in sets; go to OpenML when you need something specific.
import sklearn.datasets
dataset = sklearn.datasets.load_iris(as_frame=True)
df = dataset.frame
load_*fetch_*load_* sets ship with scikit-learn; fetch_* sets are downloaded on first use and cached.
import seaborn
seaborn.get_dataset_names()
df = seaborn.load_dataset('titanic')
The datasets used in seaborn's examples, returned straight as pandas DataFrames.
pip install ucimlrepo
import ucimlrepo as uci
uci.list_available_datasets()
dataset = uci.fetch_ucirepo(id=45)
df = dataset.data.original
The UC Irvine Machine Learning Repository: pick a dataset by its id.
pip install openml
import openml
dataset = openml.datasets.get_dataset(61)
X, y, categorical, names = dataset.get_data(
target=dataset.default_target_attribute)
get_data also tells you which columns are categorical and what they are called.