Search found 44 matches

by chester
Wed Nov 30, 2016 2:06 pm
Forum: Programming
Topic: Directory name is invalid?
Replies: 1
Views: 2359

Directory name is invalid?

Unable to create process: The directory name is invalid. I am trying to use the spawn command to execute a Python script from my EViews program. The file directory clearly exists as I am in it right now. What could possibly be the reason here? Code below: %command = " python ""P:\Fold...
by chester
Mon Nov 28, 2016 7:46 am
Forum: Programming
Topic: EViews won't read full time series in my CSV file
Replies: 3
Views: 4891

Re: EViews won't read full time series in my CSV file

Alright, thanks for the reply.
In general, are .xlsx files less problematic than .csv files for minor issues like this?
by chester
Fri Nov 25, 2016 10:18 am
Forum: Programming
Topic: EViews won't read full time series in my CSV file
Replies: 3
Views: 4891

EViews won't read full time series in my CSV file

I'm trying to import my CSV file into an EViews workfile. It is an annual time series that goes from 1971 to 2015 but for some reason, EViews only reads until 2012 in the workfile. I've uploaded my file. Is there any reason why this would be happening? newdata.csv This is my pageload command: pagelo...
by chester
Mon Nov 21, 2016 7:37 am
Forum: Programming
Topic: Query: Does Not Match?
Replies: 1
Views: 3348

Query: Does Not Match?

I'd like to query all the series in my EViews database that do NOT have a description containing the string "random".
I basically want to do an inverse of whatever comes out of the "matches" clause. How can that syntax be written?
by chester
Thu Nov 17, 2016 2:38 pm
Forum: Programming
Topic: Delete blank rows in alpha series
Replies: 5
Views: 4289

Re: Delete blank rows in alpha series

I'm not aware of any way to sort a series without affecting the rest of its page. I believe you'll need to copy the data to a new page, sort it there, and then copy it back. For example: %originalPage = @pagename pagecopy(page=tmp) alpha sort alpha copy alpha {%originalPage}\alpha pagedelete tmp Hm...
by chester
Thu Nov 17, 2016 12:04 pm
Forum: Programming
Topic: Delete blank rows in alpha series
Replies: 5
Views: 4289

Re: Delete blank rows in alpha series

Hello, The delete command removes entire objects, not individual observations. In addition, the length of an alpha series is dependent on the workfile page's observations, so you cannot "shorten" the alpha series without removing observations from the workfile page. If that's what you wan...
by chester
Thu Nov 17, 2016 9:00 am
Forum: Programming
Topic: Delete blank rows in alpha series
Replies: 5
Views: 4289

Delete blank rows in alpha series

I'm simply trying to remove blank rows in my alpha series called 'uniquegroups'.
What is wrong with this approach?

Code: Select all

   for !i=1 to @obsrange
      if uniquegroups(!i) = "" then
         delete uniquegroups(!i)
      endif
   next
by chester
Thu Nov 17, 2016 7:27 am
Forum: Programming
Topic: @uniquevals with option to exclude
Replies: 3
Views: 3352

Re: @uniquevals with option to exclude

If you merely want to remove the extra space in the final string, you could use the following quick-and-dirty workaround: list = @wjoin(@wsplit(@wjoin(uniquegroups))) It's not efficient, but it is concise. There are rows in my alpha series that are actually blank and I'd like to skip them when gath...
by chester
Wed Nov 16, 2016 2:06 pm
Forum: Programming
Topic: @uniquevals with option to exclude
Replies: 3
Views: 3352

@uniquevals with option to exclude

I have an alpha series called group. I'd like all the unique values in 'group' EXCLUDING blanks.
Is there any option that I can use to achieve this?

Code: Select all

svector uniquegroups =@uniquevals(group)
list = @wjoin(uniquegroups)
by chester
Wed Nov 16, 2016 1:45 pm
Forum: Programming
Topic: Rename all series in a database based on Excel sheet
Replies: 4
Views: 3999

Re: Rename all series in a database based on Excel sheet

EViews Jason wrote:The cleanest thing to do is to just handle the 'not' case

Code: Select all

if  main_econ::{%oldseriesname}  <> main_econ::{%newseriesname} then
     rename main_econ::{%oldseriesname} main_econ::{%newseriesname}
endif


Thank you Jason. Thank worked wonderfully.
by chester
Wed Nov 16, 2016 9:26 am
Forum: Programming
Topic: Rename all series in a database based on Excel sheet
Replies: 4
Views: 3999

Re: Rename all series in a database based on Excel sheet

Assuming you have an excel file containing 2 columns of names, try: create u 10000 'create a workfile big enough to hold all the renames 'read in the excel and create two alpha series named 'oldnames' and 'newnames' import foo.xlsx range=Sheet1 colhead=0 namepos=all na="#N/A" names=(oldna...
by chester
Tue Nov 15, 2016 1:59 pm
Forum: Programming
Topic: Pageload command does not structure workfile properly
Replies: 5
Views: 4577

Re: Pageload command does not structure workfile properly

Thanks for the suggestion. I managed to find a work-around that formats my CSV data directly so EViews can read it.
by chester
Tue Nov 15, 2016 1:55 pm
Forum: Programming
Topic: Rename all series in a database based on Excel sheet
Replies: 4
Views: 3999

Rename all series in a database based on Excel sheet

I have an EViews database with 1803 series and all of them need to be renamed.
I have an Excel sheet that outlines all the old series names and maps them to new names.
How can I write a program that loops and renames series in the EViews database if they match the name in the Excel sheet?
by chester
Mon Nov 14, 2016 9:53 am
Forum: Programming
Topic: Pageload command does not structure workfile properly
Replies: 5
Views: 4577

Re: Pageload command does not structure workfile properly

Can you post (or just a portion of) your CSV file? It appears EViews will not read quarterly time series data if it follows the format: "Q1 2012" - for example. The workfile with imported data is unstructured. However, if the data follows the format: "2012 Q1", the resulting wor...
by chester
Thu Nov 10, 2016 1:17 pm
Forum: Programming
Topic: Pageload command does not structure workfile properly
Replies: 5
Views: 4577

Pageload command does not structure workfile properly

I have data that is labelled by group. For groups with the word "Quarterly" in them, I'd like to import them into a workfile page that is structured in a Quarterly format. For some reason '@freq q' does not structure the workfile in a quarterly format but '@freq a' or '@freq m' structures ...

Go to advanced search