Os error unable to read .csv file

Hi i have uploaded a csv file and was shown in the attached file panel.
but when I write

dataset = loadtxt(‘pima-indians-diabetes.csv’, delimiter=’,’)

an os error occur : OSError: pima-indians-diabetes.csv not found.

please help!

Hi @alex_He,

It’s hard to tell what could cause this problem without additional information. Could you please provide a screenshot of the attached file panel and an output of os.listdir()?

I pasted the images in the reply post, please help

It seems that there is a typo and the actual file name is pima-indians-diabetes.data.csv


oh, that is my mistake. Thankyou very much for your helps.
Thanks a lot

Just a heads up in the future you can right click a file in the attached files window and select “copy to clipboard”. Especially helpful if you have files in folders.

1 Like