Eviews Python - pyeviews

For questions regarding programming in the EViews programming language.

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

marend
Posts: 13
Joined: Fri Jul 19, 2013 12:20 pm

Eviews Python - pyeviews

Postby marend » Mon Aug 22, 2016 1:45 pm

Hello, I am working with pyeviews in Python and I am struggling to keep data in the same page of a workfile, but I haven't been able to do it. Can you help me with this (thank you!). My code is:

import numpy as np
import pandas as pa
dtsq2 = pa.date_range('1998q1', periods = 12, freq = 'Q')
benchmark = pa.Series([98.8, 100.1, 102.9, 100.4, 99.9, 101.1, 102.0, 101.4, 100.9, 103.7, 103.4, 101.4], index=dtsq2, name = 'benchmark')
dtsq = pa.date_range('1998q1', periods = 12, freq = 'Q')
indicator = pa.Series([98.2, 100.8, 102.2, 100.8, 99., 101.6, 102.7, 101.5, 100.5, 103., 103.5, 101.5], index = dtsq, name = 'indicator')


import pyeviews as evp
eviewsapp = evp.GetEViewsApp(instance='existing', showwindow=True)
evp.PutPythonAsWF(benchmark, app=eviewsapp)
evp.PutPythonAsWF(indicator, app=eviewsapp, newwf=False)

evp.Run('pageselect Untitled', app=eviewsapp)
evp.Run('pagerename Untitled quarterly', app=eviewsapp)
evp.Run('pageselect Untitled1', app=eviewsapp)
evp.Run('pagerename Untitled1 quarterly', app=eviewsapp)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Eviews Python - pyeviews

Postby EViews Gareth » Mon Aug 22, 2016 2:17 pm

I don't know much about the python stuff (actually, don't know anything about it), but I would guess that it only lets you import as a new page each time, so you'll have to import into two separate pages then issue a copy command to copy from one page to another.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 37 guests