Page 1 of 1

pyeviews: Python + EViews

Posted: Fri Jul 22, 2016 12:40 am
by maxchen
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'

Re: pyeviews: Python + EViews

Posted: Fri Jul 22, 2016 12:06 pm
by EViews Rebecca
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.

Re: pyeviews: Python + EViews

Posted: Wed Jan 06, 2021 12:08 pm
by amir sadeghi
trying to replicate the example in the white paper, I get the attached error related to the PutPythonAsWF function:

Re: pyeviews: Python + EViews

Posted: Thu Jan 07, 2021 9:34 pm
by EViews Rebecca
Which version of pandas are you using?

Re: pyeviews: Python + EViews

Posted: Mon Jan 11, 2021 9:38 pm
by EViews Rebecca
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.