The code arr = np.loadtxt("sample_data.csv", delimiter=",", dtype=str) creates an array of objects which have the following attributes:
- name: array containing the column names in the file sample_data.
import numpy as np
# using loadtxt()
arr = np.loadtxt("sample_data.csv",
delimiter=",", dtype=str)
display(arr)