From the question above please help me fix my specific problem shown below:
I am trying to use an Excel file for my function from the file directory “C:/Users/Jonas/Documents/EXCEL_DOC.xlsx”
Am getting the error: NotADirectoryError: [WinError 267] The directory name is invalid: ‘C:/Users/Jonas/Documents/EXCEL_DOC.xlsx’
When trying to use this .xlsx file in my code.
Following code:
import os
import pandas as pd
def(Argument):
blah
Argument=os.chdir(“C:/Users/Jonas/Documents/EXCEL_DOC.xlsx”)
print(Argument)
How can this be fixed?
Thanks for the help.