我正在尝试使用 pandas.read_stata
读取 Python 中的 Stata (.dta
) 文件,但出现此错误:
ValueError: Version of given Stata file is not 104, 105, 108, 111 (Stata 7SE), 113 (Stata 8/9), 114 (Stata 10/11), 115 (Stata 12), 117 (Stata 13), or 118 (Stata 14)
请指教。
最佳答案
只需使用 Pandas 的 read_table(),然后确保包含 delim_whitespace=True 和 header=None。
关于python - 无法在 python 中读取 stata .dta 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47051326/