| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.DataFrame.to_csv.html | [Back] [Original] |
Section Navigation
Write object to a comma-separated values (csv) file.
Examples:
>>> import bigframes.pandas as bpd
>>> df = bpd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.to_csv()
',col1,col2\n0,1,3\n1,2,4\n'
path_or_buf (str, path object, file-like object, or None, default None) String, path object (implementing os.PathLike[str]), or file-like object implementing a write() function. If None, the result is returned as a string. If a non-binary file object is passed, it should be opened with newline=, disabling universal newlines. If a binary file object is passed, mode might need to contain a b. Must contain a wildcard character * if this is a GCS path.
sep (str, default ',') String of length 1. Field delimiter for the output file.
header (bool, default True) Write out the column names.
index (bool, default True) Write row names (index).
allow_large_results (bool, default None) If not None, overrides the global setting to allow or disallow large query results over the default size limit of 10 GB.
If path_or_buf is None, returns the resulting csv format as a string. Otherwise returns None.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |