To write a Pandas DataFrame to a CSV file without the index, use the to_csv method and set the index parameter to False. For example:
import pandas as pd df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]}) df.to_csv('df.csv', index=False)
This will write the contents of the DataFrame df to the file df.csv without including the index.