File tree Expand file tree Collapse file tree 3 files changed +266
-76
lines changed Expand file tree Collapse file tree 3 files changed +266
-76
lines changed Original file line number Diff line number Diff line change @@ -1915,14 +1915,17 @@ def to_stata(
1915
1915
>>> df.to_stata('animals.dta') # doctest: +SKIP
1916
1916
"""
1917
1917
kwargs = {}
1918
- if version not in (114 , 117 ):
1918
+ if version not in (114 , 117 , 118 ):
1919
1919
raise ValueError ("Only formats 114 and 117 supported." )
1920
1920
if version == 114 :
1921
1921
if convert_strl is not None :
1922
1922
raise ValueError ("strl support is only available when using format 117" )
1923
1923
from pandas .io .stata import StataWriter as statawriter
1924
1924
else :
1925
- from pandas .io .stata import StataWriter117 as statawriter
1925
+ if version == 117 :
1926
+ from pandas .io .stata import StataWriter117 as statawriter
1927
+ else :
1928
+ from pandas .io .stata import StataWriter118 as statawriter
1926
1929
1927
1930
kwargs ["convert_strl" ] = convert_strl
1928
1931
You can’t perform that action at this time.
0 commit comments