Untitled

 avatar
unknown
python
a year ago
471 B
6
Indexable
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)
Editor is loading...
Leave a Comment