0

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

charles
  • 89
  • 2
  • 11

2 Answers2

2

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

kimcodes
  • 704
  • 1
  • 6
  • 16
Mam1004
  • 59
  • 7
0

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

1010011010
  • 25
  • 1
  • 12