I have created a module in a subdirectory named modules. I can use from the main directory, e.g. main.py with import modules.my_module as expected. In my_module I call data = pd.read_excel("data.ods"), but Python starts looking in the main directory. Is there a cleaner solution than making the path data = pd.read_excel("modules/data.ods")?
Asked
Active
Viewed 12 times
0
AndreasInfo
- 778
- 6
- 15