Opening CSV by Rows

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Opening CSV by Rows

Postby KUN0 » Tue Nov 24, 2015 10:22 am

I am trying to open a CVS file which is transposed into rows. I have sucessfully used the "byrows" arguement in my wfopen function, but the mnemonic name I want is included in the second column rather than the in the first. Is there a way to open a CSV file by row and use the second column to name the series?

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

Re: Opening CSV by Rows

Postby EViews Gareth » Tue Nov 24, 2015 10:28 am

Yes, Step 3 of the dialog allows you to specify how many header rows there are, and which row the names are in.

By the time you get to Step 3, you've already told EViews to transpose the data, so the columns are now rows.

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Re: Opening CSV by Rows

Postby KUN0 » Tue Nov 24, 2015 11:27 am

I should have been clearer. I need this to run automatically as part of a program. Thus far I have the following...

wfopen(d=new) "s:\DDLdownload\equitymsri.da.csv" byrow

The program is defaulting to using the first column as my series names. I need the second column.

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

Re: Opening CSV by Rows

Postby EViews Gareth » Tue Nov 24, 2015 12:01 pm

Do it using the interface, then look at the command capture log to view the command line form. It will be something using the colhead= argument and the names= argument.

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Re: Opening CSV by Rows

Postby KUN0 » Tue Nov 24, 2015 12:32 pm

I can't figure it out, and I'm being asked by my superiors to stop spending time on this. Please let me know if there is a straightforward answer to this... Screenshot attached.

I need my series to be named according to column B and dated according to row 1

Capture.PNG
Capture.PNG (16.95 KiB) Viewed 7283 times

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

Re: Opening CSV by Rows

Postby EViews Gareth » Tue Nov 24, 2015 12:37 pm

Can you provide the Excel file?

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Re: Opening CSV by Rows

Postby KUN0 » Wed Dec 09, 2015 7:33 am

Here is the file
Attachments
test.csv
(315 Bytes) Downloaded 380 times

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

Re: Opening CSV by Rows

Postby EViews Gareth » Wed Dec 09, 2015 9:30 am

wfopen test.csv byrow colhead=2 namepos=last

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Re: Opening CSV by Rows

Postby KUN0 » Wed Dec 09, 2015 12:13 pm

Excellent! Thanks very much!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests