Here, the “records” parameter value has nothing to do with any of the columns in the dataset, but rather the format in which to export the data. The “records” format refers to a list of dictionaries.
6.2 To CSV File
We can use the to_csv method to export a DataFrame to a CSV file.
As a parameter, we specify the name of the CSV file that should be created (in this case, “products_copy.csv”), as well as whether or not to include the index as a column in the resulting file:
df.to_csv("products_copy.csv", index=False)
In Colab, the file will be saved to the Colab Filesystem, where we have the ability to download the file to our local machine.