0
from pandas import Series


data = [1000, 2000, 3000]
index = ['a', 'b', 'c']
s = Series(data = data, index = index)

s.to_excel('/content/drive/MyDrive/Colab Notebooks/data.xlsx')

This does not work and it says

[Errno 2] No such file or directory:

But I do have such directories and same file names!!

  • Are you sure you mounted Google Drive? Does [such checking](https://stackoverflow.com/questions/54689708/filenotfounderror-errno-2-no-such-file-or-directory-google-colab) show your file? – ans Nov 29 '21 at 07:28
  • use the os library, check `os.path.exists(....)` – StupidWolf Dec 06 '21 at 05:44

0 Answers0