diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f1e7f6d477906..11257a49761ad 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -476,7 +476,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DataFrame.sparse.from_spmatrix\ pandas.DataFrame.sparse.to_coo\ pandas.DataFrame.sparse.to_dense\ - pandas.DataFrame.to_csv\ pandas.DataFrame.to_feather\ pandas.DataFrame.to_html\ pandas.DataFrame.to_markdown\ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 0880e6730fd93..f9cbce12e9da9 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -3670,7 +3670,18 @@ def to_csv( storage_options: StorageOptions | None = None, ) -> str | None: r""" - Write object to a comma-separated values (csv) file. + Write object to a comma-separated values (CSV) file. + + This method enables users to write object to comma-separated values (CSV) file + with customizable options. These options include specifying the delimiter, + handling missing data, formatting numbers, selecting columns, including + headers and row names, defining file opening modes, setting encoding and + compression options, controlling quoting and escaping characters, specifying + newline characters, managing chunk sizes, formatting datetime objects, handling + errors during encoding/decoding, and providing storage connection options. + + The method returns None if ``path_or_buf`` is not specified; + otherwise, it returns the resulting CSV format as a string. Parameters ----------