I want to read all .csv files in a directory using Python. So when I googled it, I got this solution Find all files in a directory with extension .txt in Python
But when I entered
import glob
import os
os.chdir("/Desktop")
I am getting the following error
>>> os.chdir("~/Desktop")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory: '~/Desktop'
I am really confused where am I wrong? Thank you in advance.