Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Read csv in Stata

From   Nikolaos Kanellopoulos <>
To   "" <>
Subject   st: Read csv in Stata
Date   Mon, 21 Oct 2013 13:56:30 +0100 (BST)

Dear all,

I have a set of csv files which I want to read into Stata. Their first two lines are:

Year,Reporter Code,Trade Flow Code,Partner Code,Classification,Commodity Code,Quantity Unit Code,Supplementary Quantity,Netweight (kg),Value,Estimation Code

Unfortunately in order to use insheet the second line must become

ie lose leading and ending double quotes and replace the double double quotes with double quotes.

To do these I use a text editor, but because the files have many observations this takes too long.
Do you have any idea of how I can do that faster and preferably in Stata.

Thanks for your time.
All the best, 

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index