@@ -552,6 +552,49 @@ def to_parquet(
552552 ``None``, ``snappy``, or ``gzip``.
553553 """
554554 raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
555+
556+ def to_csv (
557+ self ,
558+ path_or_buf = None ,
559+ sep = "," ,
560+ * ,
561+ header : bool = True ,
562+ index : bool = True ,
563+ allow_large_results : Optional [bool ] = None ,
564+ ) -> dict | list [dict ]:
565+ """
566+ Write object to a comma-separated values (csv) file.
567+
568+ **Examples:**
569+
570+ >>> import bigframes.pandas as bpd
571+
572+ >>> df = bpd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
573+ >>> df.to_csv()
574+ \' ,col1,col2\\ n0,1,3\\ n1,2,4\\ n\'
575+
576+ Args:
577+ path_or_buf (str, path object, file-like object, or None, default None):
578+ String, path object (implementing os.PathLike[str]), or file-like object
579+ implementing a write() function. If None, the result is returned as a string.
580+ If a non-binary file object is passed, it should be opened with newline='',
581+ disabling universal newlines. If a binary file object is passed,
582+ mode might need to contain a 'b'.
583+ Must contain a wildcard character '*' if this is a GCS path.
584+ sep (str, default ','):
585+ String of length 1. Field delimiter for the output file.
586+ header (bool, default True):
587+ Write out the column names.
588+ index (bool, default True):
589+ Write row names (index).
590+ allow_large_results (bool, default None):
591+ If not None, overrides the global setting to allow or disallow large
592+ query results over the default size limit of 10 GB.
593+
594+ Returns:
595+ If path_or_buf is None, returns the resulting csv format as a string. Otherwise returns None.
596+ """
597+ raise NotImplementedError (constants .ABSTRACT_METHOD_ERROR_MESSAGE )
555598
556599 def to_dict (
557600 self ,
0 commit comments