Advertisements
Advertisements
प्रश्न
Which of the following Python statements is used to write a Pandas DataFrame df to a CSV file?
विकल्प
df.to_csv()df.write_csv()df.to_table()df.export_csv()
MCQ
Advertisements
उत्तर
df.to_csv()
Explanation:
In Pandas, the to_csv() function is used to write (export) a DataFrame to a CSV file.
Example:
df.to_csv("data.csv", index=False)shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
