This Python script merges data from studentlist.csv
and studentdata.csv
into a new file finallist.csv
.
The script performs the following tasks:
- Reads
studentdata.csv
to create a dictionary based on the 'name' field. - Reads
studentlist.csv
to retrieve 'id', 'regdno', and 'name'. - Matches 'name' from
studentlist.csv
with the dictionary created fromstudentdata.csv
. - Creates a new CSV file
finallist.csv
containing merged data.
- Python 3.x
- CSV files:
studentlist.csv
,studentdata.csv
-
Clone Repository: git clone https://github.com/ramabhadrarao/Merge-Student-Data-Utility cd merge-student-data
-
Install Dependencies (if needed): This script uses only built-in Python libraries. No additional dependencies are required.
-
Run the Script:
- Ensure
studentlist.csv
andstudentdata.csv
are in the root directory. - Execute the script using Python:
python merge_data.py
- Output:
After execution, a new file named
finallist.csv
will be created in the same directory.
merge_data.py
: Python script to merge data.studentlist.csv
: Contains student details with 'id', 'regdno', and 'name'.studentdata.csv
: Contains additional data based on 'name'.
Feel free to contribute to enhance the functionality or optimize the code. Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/awesome-idea
). - Make modifications and commit changes (
git commit -am 'Add awesome feature'
). - Push the changes to your branch (
git push origin feature/awesome-idea
). - Create a pull request.
This project is licensed under the [MIT License].
Author: Rama Bhadra Rao Maddu