Importing csv file - series coming trough as alphas

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

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

macgibbonn
Posts: 3
Joined: Mon May 22, 2017 9:19 pm

Importing csv file - series coming trough as alphas

Postby macgibbonn » Mon May 22, 2017 10:53 pm

I am using Eviews 9.5 (32-bit version on an Enterprise licence)

I am importing a csv file (attached) of time series numeric data which contains occasional missing values as ".."

The simple import code I am using is:

Code: Select all

import  M:\ExportDirect.csv  colhead=1  @freq Q 1986q1


Four (4) of the 152 series are being imported as alphas rather than numeric. These series are:
    HLFQ_SMB1JCA
    HLFQ_SMB2JBE
    HLFQ_SMB3JBF
    HLFQ_SMB3JCK

While these 4 series all have occasional instances of "..", there are other series which also have instances of ".." which are coming through as numeric.

Any suggestions as to how I can get the import to recognise the ".." as missing values?

I tried the following, but it did not work:

Code: Select all

import  M:\ExportDirect.csv  na=".." colhead=1  @freq Q 1986q1


Thanks in advance for any assistance
Attachments
ExportDirect.csv
(26.8 KiB) Downloaded 259 times

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

Re: Importing csv file - series coming trough as alphas

Postby EViews Gareth » Tue May 23, 2017 7:44 am

The problem is that you actually have two different values for NA - ".." and "" (i.e. blank). EViews only recognises one at a time, so interprets the second as a character.

You'll have to convert them to series afterwards using @val (or change the source csv to only have one type of NA).
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 40 guests