lightbulbBook reference: Géron, Hands-On Machine Learning, Ch. 2 ("Get the Data", "Take a Quick Look at the Data Structure", "Create a Test Set"). Written in our own words.
With the problem framed, it's time to get the data. In a company, this might mean finding the right database, asking for access, and writing a script that downloads a fresh copy whenever you need it. Here we'll use the California housing dataset that comes with scikit-learn, so you can follow along on any computer.
This topic has one surprisingly important lesson: set aside a test set almost immediately, before you look at the data in detail. The reason is a sneaky problem called data snooping, which we'll explain below.