Home > Blockchain >  pandas-gbq requires db-dtypes
pandas-gbq requires db-dtypes

Time:09-08

I can run my code from the terminal. But when I run it using the vscode debugger I get this error

Exception has occurred: ImportError pandas-gbq requires db-dtypes

The error is in this line

df = pd.read_gbq(query, project_id='anyproject')

CodePudding user response:

enter image description here

enter image description here

This module db-dtypes will be automatically installed when installing pandas-gbq. It seems that your installation failed and you did not get it. You can try to install it separately by the following command:

pip install db-dtypes

or reinstall the pandas-gbq:

pip uninstall pandas_gbq

then

pip install pandas_gbq
  • Related