In the following snippet the two to_csv calls differs only in the index argument. Although the output header in the first case is (index), 'X', 'Y' but in the second case is 'A', 'B'. The documentation didn't suggest that sort of difference.
import pandas as pd
df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
df.to_csv('testtocsv1.csv', header=['X', 'Y'])
df.to_csv('testtocsv2.csv', index=False, header=['X', 'Y'])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4