Skip to content

Instantly share code, notes, and snippets.

@rlcarrca
Created September 17, 2025 01:33
Show Gist options
  • Save rlcarrca/72273f733beb04d74717aec92e0ec524 to your computer and use it in GitHub Desktop.
Save rlcarrca/72273f733beb04d74717aec92e0ec524 to your computer and use it in GitHub Desktop.
CSV to Excel
import pandas as pd
def csv_to_excel(csv_file, excel_file):
df = pd.read_csv(csv_file)
df.to_excel(excel_file, index=False)
# Usage
csv_to_excel('data.csv', 'data.xlsx')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment