@@ -1856,8 +1856,11 @@ def to_stata(self, fname, convert_dates=None, write_index=True,
18561856
18571857 Parameters
18581858 ----------
1859- fname : str, file descriptor or pathlib.Path
1860- String or path to file which needs to be converted.
1859+ fname : str, buffer or path object
1860+ String, path object (pathlib.Path or py._path.local.LocalPath) or
1861+ object implementing a binary write() function. If using a buffer
1862+ then the buffer will not be automatically closed after the file
1863+ data has been written.
18611864 convert_dates : dict
18621865 Dictionary mapping columns containing datetime types to stata
18631866 internal format to use when writing the dates. Options are 'tc',
@@ -1914,18 +1917,16 @@ def to_stata(self, fname, convert_dates=None, write_index=True,
19141917
19151918 See Also
19161919 --------
1917- pandas. read_stata : Import Stata data files.
1918- pandas. io.stata.StataWriter : Writer for Stata data files.
1919- pandas. io.stata.StataWriter117 : Writer for version 117 files.
1920+ read_stata : Import Stata data files.
1921+ io.stata.StataWriter : Writer for Stata data files.
1922+ io.stata.StataWriter117 : Writer for version 117 files.
19201923
19211924 Examples
19221925 --------
1923- Converting DataFrame to Stata "dta" file using the to_stata method.
1924-
19251926 >>> df = pd.DataFrame({'animal': ['falcon', 'parrot', 'falcon',
19261927 ... 'parrot'],
19271928 ... 'speed': [350, 18, 361, 15]})
1928- >>> df.to_stata('animals.dta')
1929+ >>> df.to_stata('animals.dta') # doctest: +SKIP
19291930 """
19301931 kwargs = {}
19311932 if version not in (114 , 117 ):
0 commit comments