This repository contains a python code that will help merge data from multiple files into a single file Stepwise guide to use this code to merge data from multiple files into a single file. Note: The code is written using Python software (version 3.11.1, 64-bit for Windows 10)
- Copy all files to be merged to a folder in a particular drive in your system. Note down the path of a file. Please add the filename with extension at the end of the path.
- Create an empty file in notepad in another folder in the same drive. This file will contain all the merged data after executing the code. Note down the path of this file.
- Copy the code into a Notepad.
- Modify the following lines in the code in notepad:
a. Line 4 of the code, path =, replace text within the quotation marks with the path that is noted down in Step 1.
b. Line 8 of the code, with open (“..”).., replace text within the first quotation marks with the path that is noted down in Step 2.
Please note: The locations of the folder and file in a Windows OS are specified with ''. Please replace the '' with '/', to prevent errors, while executing script in python.
- Copy and paste the modified code in Python terminal.
- Press enter. You will get a prompt to type a new command - >>>_
- Type d() after prompt- >>>d()
- Press enter.
- You will get a prompt (>>>) to type a new command, after the program has been executed. Now check the file created in Step 2. It should contain all the merged data.