Skip to content

Glossary: pandas Basics

to_csv

Also written: .to_csv(), index=False, float_format

Writes a DataFrame to a CSV file, replacing any file of the same name. `index=False` leaves out the row labels, and `float_format="%.2f"` sets decimals.

Where the book teaches it

Related terms

read_csvreset_index