write specific columns to csv pandas code example Example: write specific columns to csv pandas df[['col1', 'col3']].to_csv('some_file.csv')