Untitled

mail@pastecode.io avatar
unknown
python
a month ago
471 B
1
Indexable
Never
import pandas as pd

# List of Excel file paths (replace with your actual files)
file_paths = ["file1.xlsx", "file2.xlsx", "file3.xlsx"]

# Combine data from multiple files into a single DataFrame
combined_data = pd.DataFrame()
for file_path in file_paths:
    df = pd.read_excel(file_path)
    combined_data = combined_data.append(df, ignore_index=True)

# Write the combined data to a new Excel file
combined_data.to_excel("combined_data.xlsx", index=False)
Leave a Comment