Skip to content

Instantly share code, notes, and snippets.

@fredrikw
Last active May 3, 2021 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredrikw/930e388da9c6f37c2b24544b77a6ba89 to your computer and use it in GitHub Desktop.
Save fredrikw/930e388da9c6f37c2b24544b77a6ba89 to your computer and use it in GitHub Desktop.
Test dockerfile for pandas issue 41237 (https://github.com/pandas-dev/pandas/issues/41237)
FROM python
WORKDIR /usr/src/app
RUN pip install pandas
# Change the above line for the following to get the expected table not found error
# RUN pip install pandas sqlalchemy
RUN echo 'import pandas as pd\n\
saconnstring="sqlite:///test.db"\n\
print(pd.read_sql_table("test", saconnstring))\n\
print("Done")\n' >> testscript.py
CMD ["python", "testscript.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment