AutoSkill 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.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/merge-multiple-excel-files-with-source-filename-column" ~/.claude/skills/ecnu-icalk-autoskill-merge-multiple-excel-files-with-source-filename-column && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/merge-multiple-excel-files-with-source-filename-column/SKILL.mdsource content
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