13

I have the following error while exporting pandas dataframe into csv file. I have enough space in my hard disk.

 OSError: [Errno 28] No space left on device

What can be the reason of this? Many thanks in advance.

Khalid
  • 471
  • 1
  • 5
  • 13
  • I suspect your tmp directory gets exhausted. – Géza Török Nov 24 '18 at 09:56
  • Thanks for your reply. How can I clean my tmp directory? – Khalid Nov 24 '18 at 09:57
  • 2
    @khalid, as pointed out earlier, clear your cache/tmp directory. For more clear understanding have a look here https://stackoverflow.com/questions/6998083/python-causing-ioerror-errno-28-no-space-left-on-device-results-32766-h – sync11 Nov 24 '18 at 10:00
  • What OS you are working on, if its Linux , First try to see the space on the terminal by executing `pwd; df -Ph .` and see `Avail` & `Use%` column, – Karn Kumar Nov 24 '18 at 10:00
  • Apologies, i'm non window user :( – Karn Kumar Nov 24 '18 at 10:02
  • @dataLeo I have looked at this link. Actually, it is not clear how to clean my directory from this link. There was a part, however it did not work. – Khalid Nov 24 '18 at 10:02
  • @Khalid Which Win OS are you using? – sync11 Nov 24 '18 at 10:04
  • @dataLeo WIndows 7 – Khalid Nov 24 '18 at 10:05
  • 3
    Open `Run` and type `%temp%`. This will lead to temp files folder. Select all and delete them. If some doesn't get delete, don't worry. Restart and try to save your CSV. If that doesn't help I advice you to do a disk defragmentation, steps of which can be found here https://support.microsoft.com/en-in/help/17126/windows-7-improve-performance-defragmenting-hard-disk – sync11 Nov 24 '18 at 10:11
  • @dataLeo That is the issue. I cant do it. I would like to ask you whether you know how to delete temp files by using python code. – Khalid Nov 24 '18 at 10:14
  • You can do it without python. Follow above steps which I've mentioned. If you insists to do it using python then change the path to above mentioned directory and delete all files. I suggest you follow first method. – sync11 Nov 24 '18 at 10:34
  • @dataLeo I have joined some powerful PC and work on it. Therefore, I cant to it. Regarding python. So, I should try the following method: cd /tmp rm /tmp . I try, however it did not delete it – Khalid Nov 24 '18 at 10:36
  • Does `%env JOBLIB_TEMP_FOLDER=/tmp` solve your problem? – Gonçalo Peres May 05 '21 at 08:07

1 Answers1

0

Try to delete the temp files

rm -r /tmp/
Razia Khan
  • 455
  • 6
  • 13