pyeviews: Python + EViews

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

pyeviews: Python + EViews

Postby maxchen » Fri Jul 22, 2016 12:40 am

http://www.eviews.com/download/whitepapers/pyeviews.pdf
in the white paper: pyeviews.PutPythonAsWF(object, app=None, newwf=True)
Parameters says
pagename: string, optional.
Name of the EViews workfile page to be created

It seems that this "pagename" paramter is not implemented

Code: Select all

import numpy as np
import pandas as pa
#the annual series "benchmark" and the quarterly series "indicator"
dtsa = pa.date_range('1998', periods = 3, freq = 'A')
benchmark = pa.Series([4000.,4161.4,np.nan], index=dtsa, 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')

#create pages for the benchmark and indicator series
import pyeviews as evp
eviewsapp = evp.GetEViewsApp(instance='new', showwindow=True)

evp.PutPythonAsWF(benchmark, app=eviewsapp, pagename='annual')

the last line results in an error
TypeError: PutPythonAsWF() got an unexpected keyword argument 'pagename'

EViews Rebecca
EViews Developer
Posts: 113
Joined: Thu Apr 18, 2013 8:37 am

Re: pyeviews: Python + EViews

Postby EViews Rebecca » Fri Jul 22, 2016 12:06 pm

You're correct. That option shouldn't be there in the list of functions (yet). The whitepaper is now updated. Thanks for pointing that out.

amir sadeghi
Posts: 3
Joined: Mon Mar 28, 2016 9:23 am

Re: pyeviews: Python + EViews

Postby amir sadeghi » Wed Jan 06, 2021 12:08 pm

trying to replicate the example in the white paper, I get the attached error related to the PutPythonAsWF function:
Attachments
Capture.PNG
Capture.PNG (69.42 KiB) Viewed 12947 times

EViews Rebecca
EViews Developer
Posts: 113
Joined: Thu Apr 18, 2013 8:37 am

Re: pyeviews: Python + EViews

Postby EViews Rebecca » Thu Jan 07, 2021 9:34 pm

Which version of pandas are you using?

EViews Rebecca
EViews Developer
Posts: 113
Joined: Thu Apr 18, 2013 8:37 am

Re: pyeviews: Python + EViews

Postby EViews Rebecca » Mon Jan 11, 2021 9:38 pm

There was a change in pandas 1.1.0 in 2020 that required a pyeviews update. Please update to pyeviews 1.0.2 with "pip install pyeviews --upgrade" or "conda update pyeviews" if you are using conda/Anaconda.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 19 guests