user3339672
user3339672

Reputation: 31

Join data from two files based on start and end parameters

I am new to Python and trying to write python script to merge data from two files based on start and count parameters. I am able to parse the file and get in the required format (file 1 and file 2) but stuck at that point to join two files. File 1 and 2 are ready now i have to join these two files where start column will determine which row from file 2 to start at and count field determined how many records including start point to copy. Based on this records will be copied to Output file. Please help.

Please see the image attached for more details.Python request

Here's the sample code where start and end(count+start -1) are static but i would like to make it dynamic and coming from file 1 and then merge data from both file. Appreciate all the help.

enter image description here

Thanks and Regards,

Andy

Upvotes: 0

Views: 80

Answers (1)

user3339672
user3339672

Reputation: 31

I was able to resolve it myself by adding list and for loop.

Upvotes: 0

Related Questions