Convert a dta file to csv without Stata software

csv, file-conversion, stata

Solution

The frankly-incredible data-analysis library for Python called `Pandas` has a function to read Stata files.

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!

Problem

Is there a way to convert a `dta` file to a `csv`? I do not have a version of Stata installed on my computer, so I cannot do something like: ``` File --> "Save as csv" ```

Original source

Related problems