Is there a way to convert a dta file to a csv?
dta
csv
I do not have a version of Stata installed on my computer, so I cannot do something like:
File --> "Save as csv"
The frankly-incredible data-analysis library for Python called Pandas has a function to read Stata files.
Pandas
After installing Pandas you can just do:
>>> import pandas as pd >>> data = pd.io.stata.read_stata('my_stata_file.dta') >>> data.to_csv('my_stata_file.csv')
Amazing!
1.4m articles
1.4m replys
5 comments
57.0k users