How to Load Machine Learning Data From Scratch In Python

Last Updated on December 11, 2019

You must know how to load data before you can use it to train a machine learning model.

When starting out, it is a good idea to stick with small in-memory datasets using standard file formats like comma separated value (.csv).

In this tutorial you will discover how to load your data in Python from scratch, including:

  • How to load a CSV file.
  • How to convert strings from a file to floating point numbers.
  • How to convert class values from a file to integers.

Kick-start your project with my new book Machine Learning Algorithms From Scratch, including step-by-step tutorials and the Python source code files for all examples.

Let’s get started.

  • Update Nov/2016: Added an improved data loading function to skip empty lines.
  • Update Aug/2018: Tested and updated to work with Python 3.6.
How to Load Machine Learning Data From Scratch In Python

How to Load Machine Learning Data From Scratch In Python
Photo by Amanda B, some rights reserved.

Description

Comma Separated Values

The standard file format for small
To finish reading, please visit source site