Filtering the input file with certain rules
I have file having follwing input :
1 ABCD : M1-1-74 , A1-9 , M2-1-74 , 2 EFGH : 4-3-2 , 2-44 , 1-44 , 3 HIJK : 5-1-13 , 19-2-37 , 6-1-13 , 20-2-37 , Output file : 1 ABCD : A1-9 ,M1-1-74 , M2-1-74 , 2 EFGH : 4-3-2 , 2-44 , 1-44 , 3 HIJK : 5-1-13 , 6-1-13 , 20-2-37 , 19-2-37 , Explanation of output : 1 ABCD : A1-9 ,M1-1-74 , M2-1-74 , ----> i.e common of (M1/M2-1-74) comes together and different A1-9 comes at first. 2 EFGH : 4-3-2 , 2-44 , 1-44 , ----> i.e Common of (1/2-44) comes together and different 4-3-2 comes at first. 3 HIJK : 5-1-13 , 6-1-13 , 20-2-37 , 19-2-37 , --------> i.e Common of 5/6-1-13 comes together and 20/19-2-37 comes together. |
Hi,
are you planning to write a program to do this manipulation? Do you have a question? Cheers, Evo2. |
I have made a script in expect but right now i am taking input by manipulation from Excel , I want this fully automated.
|
Hi,
Quote:
If you really want to go the extra mile it is possible to process excel files directly (without exporting to csv). I've used the xlrd and xlwr libraries in python to do this. Evo2. |
All times are GMT -5. The time now is 02:26 PM. |