Skip to content
English
  • There are no suggestions because the search field is empty.

How will you read CSV data into an array in NumPy?

This can be achieved by using the genfromtxt() method by setting the delimiter as a comma.
 
from numpy import genfromtxt
csv_data = genfromtxt('sample_file.csv', delimiter=',')