Session Ready
Exercise

Using NumPy to import flat files

In this exercise, you're now going to load the MNIST digit recognition dataset using the numpy function loadtxt() and see just how easy it can be:

  • The first argument will be the filename.
  • The second will be the delimiter which, in this case, is a comma.

You can find more information about the MNIST dataset here on the webpage of Yann LeCun, who is currently Director of AI Research at Facebook and Founding Director of the NYU Center for Data Science, among many other things.

Instructions
100 XP
  • Fill in the arguments of np.loadtxt() by passing file and a comma ',' for the delimiter.
  • Fill in the argument of print() to print the type of the object digits. Use the function type().
  • Execute the rest of the code to visualize one of the rows of the data.