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!
Thanks

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()?

Hi
I pasted the images in the reply post, please help
Thanks

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

2 Likes

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