Permission denied when pandas dataframe to tempfile csv

后端 未结 6 2091

I\'m trying to store a pandas dataframe to a tempfile in csv format (in windows), but am being hit by:

[Errno 13] Permission denied: \'C:\\Users\\Username\\AppData\\Loca

6条回答
  •  再見小時候
    2021-02-20 02:47

    Sometimes, it gives that error simply because there is another file with the same name and it has no permission to delete the earlier file and replace it with the new file.

    1. So either name the file differently while saving it, or
    2. If you are working on Jupyter Notebook or a other similar environment, delete the file after executing the cell that reads it into memory. So that when you execute the cell which writes it to the machine, there is no other file that exists with that name.

提交回复
热议问题