I have a csv file that includes 3 columns, and I need to import it to a numpy array, respectively. The csv file is like:
Study ID DWM PVWM GCA
980500221101 1 1 1
980500251101 0 0 1
980500271101 1 1 1
980500291101 1 0 0
980500301101 2 2 1
I tried
pandas : pd.read_csv('filename.csv')
and numpy : np.genfromtxt('filename.csv',delimiter=',')
and csv:
with open('filename.csv', newline='') as csvfile:
reader = csv.DictReader(csvfile)
and got this error: charmap' codec can't decode byte 0x8d in position 639: character maps to