From 335f600a5ad7152e9572e03f8ed9760e0dfa6f0e Mon Sep 17 00:00:00 2001
From: Tuhin Sharma <tuhinsharma121@gmail.com>
Date: Tue, 3 Dec 2024 00:36:09 +0530
Subject: [PATCH] DOC: fix SA01,ES01 for pandas.io.stata.StataWriter.write_file
 (#60449)

---
 ci/code_checks.sh  |  1 -
 pandas/io/stata.py | 12 ++++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ci/code_checks.sh b/ci/code_checks.sh
index 96e06ab0d6..3948f654f9 100755
--- a/ci/code_checks.sh
+++ b/ci/code_checks.sh
@@ -113,7 +113,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
         -i "pandas.errors.ValueLabelTypeMismatch SA01" \
         -i "pandas.infer_freq SA01" \
         -i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
-        -i "pandas.io.stata.StataWriter.write_file SA01" \
         -i "pandas.plotting.andrews_curves RT03,SA01" \
         -i "pandas.plotting.scatter_matrix PR07,SA01" \
         -i "pandas.tseries.offsets.BDay PR02,SA01" \
diff --git a/pandas/io/stata.py b/pandas/io/stata.py
index ed89d5766c..63f729c834 100644
--- a/pandas/io/stata.py
+++ b/pandas/io/stata.py
@@ -2748,6 +2748,18 @@ supported types."""
         """
         Export DataFrame object to Stata dta format.
 
+        This method writes the contents of a pandas DataFrame to a `.dta` file
+        compatible with Stata. It includes features for handling value labels,
+        variable types, and metadata like timestamps and data labels. The output
+        file can then be read and used in Stata or other compatible statistical
+        tools.
+
+        See Also
+        --------
+        read_stata : Read Stata file into DataFrame.
+        DataFrame.to_stata : Export DataFrame object to Stata dta format.
+        io.stata.StataWriter : A class for writing Stata binary dta files.
+
         Examples
         --------
         >>> df = pd.DataFrame(
-- 
GitLab