Complete the code to save the DataFrame to a CSV file named 'data.csv'.
df.[1]('data.csv')
The to_csv method saves a DataFrame to a CSV file.
Complete the code to save the DataFrame without the index column.
df.to_csv('data.csv', [1]=False)
Setting index=False prevents saving the row numbers to the CSV.
Fix the error in saving only specific columns 'A' and 'B' to CSV.
df.to_csv('data.csv', [1]=['A', 'B'])
The columns parameter selects which columns to save.
Complete the code to save the DataFrame with semicolon separator and no header.
df.to_csv('data.csv', sep=';', header=[1])
Use sep=';' to change separator and header=False to omit column names.
Fill all three blanks to save only columns 'X' and 'Y', without index, and using tab as separator.
df.to_csv('data.csv', [1]=['X', 'Y'], [2]=False, sep='[3]')
Use columns=['X', 'Y'] to select columns, index=False to skip row labels, and sep='\t' for tab separator.
