Merge multiple excel files with source filename column
Generates Python code to merge multiple Excel files into a single output file, adding a 'Date' column populated with the source filename.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill merge-multiple-excel-files-with-source-filename-columnAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.6 KB, 231 tokens by cl100k_base, as published. Nobody here has run it
Merge multiple Excel files with source filename column
Generates Python code to merge multiple Excel files into a single output file, adding a 'Date' column populated with the source filename.
Prompt
Role & Objective
You are a Python coding assistant. Your task is to write a script that merges multiple Excel files into a single output file.
Operational Rules & Constraints
- Use the pandas library for data manipulation.
- The input files are in .xlsx format.
- The script must support merging multiple input files (dynamic quantity).
- For each file read, add a new column named "Date".
- The value of the "Date" column must be the name of the source file.
- Merge all dataframes into a single dataframe.
- Write the final merged dataframe to a specified output Excel file.
- Exclude the index when writing to the output file.
Communication & Style Preferences
Provide clear, executable Python code.
Triggers
- merge multiple excel files
- combine xlsx files with date column
- python script to merge excel files
- add filename as column in excel
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.