Page 1 of 1

Python access to eviews databases

Posted: Wed Feb 24, 2021 12:23 pm
by projectseeker
Hello,

In the pyeviews module there is an option to pull eviews workfiles into a pandas dataframe using pyeviews.GetWFAsPython. Is there a way of importing an eviews database file (".edb") into a pandas dataframe? Or can anyone think of a workaround for doing this?

Thanks

Re: Python access to eviews databases

Posted: Wed Feb 24, 2021 12:53 pm
by EViews Steve
There isn't a way to do it directly, but you can always create a workfile, open the EDB file, fetch the objects you want to the workfile, then get the workfile data. You would use the Run method to do all of the initial steps.

For example:

Code: Select all

evp.Run('WFCREATE A 1990 2000', app=eviewsapp) evp.Run('DBOPEN mydb.edb', app=eviewsapp) evp.Run('FETCH x y z', app=eviewsapp) x = evp.GetWFAsPython(app=eviewsapp)

Re: Python access to eviews databases

Posted: Wed Feb 24, 2021 1:16 pm
by projectseeker
Great, thank you.

Re: Python access to eviews databases

Posted: Wed Feb 24, 2021 1:46 pm
by EViews Gareth
Be careful you keep frequencies the same - no error will occur if you create an annual workfile and fetch a quarterly series into it.