Careful!!! Not all IDs are in both files!!! i. Create a list, allKeys, that include all the keys in both dictionaries combines, keys of dict1 and keys of dict2. If the column is found in both files, create two dictionaries dict1 and dict2, one for each file, with the key being the value of the "Student_ID" (201909199) and the value the whole remaining columns for that row. If not print out on the terminal that the column is not found and specify in which file it is not found. Check if the column name specified in part c. Save the column names (header) of the second file in a second list f. Save the column names (header) of the first file in a list e. Ask the user to enter the column title that needs to be used to merge the files (examples: Student_ID) d. Ask the user to enter the path to the second file and also check if it exists or not. You should ask the user to enter the path to the first file and check if it exists and readable. The two files should have one common column based on which you will merge them. Write a python script that takes as input two tab delimited text files and merge them together.
0 Comments
Leave a Reply. |