Home > OS >  Function from pandas_datareader doesn't work
Function from pandas_datareader doesn't work

Time:06-22

I have installed pandas-datareader using pip. I can import the module, but why I can't get working this command from pandas_datareader import data as wb ? I'm using a virtual environment in VSC and I have the latest version of pip.

enter image description here

CodePudding user response:

Just remove the from and use:

import pandas_datareader.data as web
import pandas as pd

df = web.DataReader('BTC-USD', 'yahoo', start='2022-01-01', end='2022-06-14')
df.tail(10)

enter image description here

  • Related