0
votes

I am trying to import pandasql. I am running the following code in a jupyter notebook running python:

!pip install pandasql
from pandasql import sqldf
import pandas as pd

This logs an error saying ModuleNotFoundError: No Module name 'pandasql'

I understand this is a common problem and have tried using the following SO posts to fix the solution without results:

ImportError: No module named pandas

How to fix ModuleNotFoundError: No module named 'pandas_datareader'

pandasql will not import : ImportError: cannot import name to_sql

2
Which python version are you using? Try: python3 install pandaslqMagofoco
pandaslq or pandasql???tdelozie

2 Answers

1
votes

I know I am quite late in responding this but try this, but as you are working on Jupyter notebook, you can try pip install pandasql in Anaconda prompt

0
votes

I think either your python you are using is wrong/doesn't have the code, or you haven't installed or printed it right.