File tree Expand file tree Collapse file tree 3 files changed +266
-77
lines changed Expand file tree Collapse file tree 3 files changed +266
-77
lines changed Original file line number Diff line number Diff line change @@ -1915,14 +1915,17 @@ def to_stata(
19151915 >>> df.to_stata('animals.dta') # doctest: +SKIP
19161916 """
19171917 kwargs = {}
1918- if version not in (114 , 117 ):
1918+ if version not in (114 , 117 , 118 ):
19191919 raise ValueError ("Only formats 114 and 117 supported." )
19201920 if version == 114 :
19211921 if convert_strl is not None :
19221922 raise ValueError ("strl support is only available when using format 117" )
19231923 from pandas .io .stata import StataWriter as statawriter
19241924 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
19261929
19271930 kwargs ["convert_strl" ] = convert_strl
19281931
You can’t perform that action at this time.
0 commit comments