to_csv() (Pandas)

df.to_csv() writes a DataFrame out to a comma-separated values file or string. It is the counterpart to read_csv and the simplest way to export results for…