Can't deploy pandas dataframe

Hi @Caroline, it seems the problem is that the path is not relative. I found a similar post that has a similar issue (Loading our own datasets - #4 by irrelevantRyan).

I added the following code based on the explanation in the above link, but still doesn’t work.

from pathlib import Path

order_history_csv = Path(__file__).parents[1] / 'datasets/Retail.OrderHistory.1.csv'

The error message is:

IndexError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)
File "Renew-Amazon-Prime.py", line 60, in <module>
    order_history_csv = Path(__file__).parents[1] / 'datasets/Retail.OrderHistory.1.csv'
File "/usr/local/lib/python3.9/pathlib.py", line 645, in __getitem__
    raise IndexError(idx)