pyeviews

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

amrsherif
Posts: 109
Joined: Mon Jul 23, 2018 4:34 pm

pyeviews

Postby amrsherif » Fri Dec 13, 2024 11:36 am

Hello,

I fixed my original problem, so I've adjusted my question accordingly.

I am trying to fetch series from an EViews database into python using pyeviews. It seems like I need to include the full path to the database. Is there a way that pyeviews can use my database registry, so as to avoid that?

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: pyeviews

Postby EViews Steve » Fri Dec 13, 2024 9:02 pm

It would help to see what you're currently doing to understand the details better.

But if you're trying to fetch data from an EViews database, I would actually call FETCH first (with the alias name) which will pull the data into a new untitled workfile, and then get the data from the workfile using GetWFAsPython, like this:

Code: Select all

import py2eviews as evp eviewsapp = evp.GetEViewsApp(instance='new', showwindow=True) #show the EViews window for debugging... eviewsapp.Run('fetch(d=dbalias) x') #fetches X into new untitled workfile x = evp.GetWFAsPython(app=eviewsapp, namefilter='X') print(x) eviewsapp.Hide() #hide the window
FYI, pyeviews was recently renamed to py2eviews, which is what I'm using here. All new updates will be made to py2eviews.

Steve

amrsherif
Posts: 109
Joined: Mon Jul 23, 2018 4:34 pm

Re: pyeviews

Postby amrsherif » Sun Dec 15, 2024 9:43 am

This works.

Thank you


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests