to csv without index pandas code example
Example 1: save dataframe to csv without index
df.to_csv(f"{filename}", index=False)
Example 2: pandas to csv without header
file = pd.read_csv(file_name, header=None)
Example 3: how to change index in dataframe python
index = [1,2]
df.index = index