Python Forum
Help with python code to search string in one file & replace with line in other file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with python code to search string in one file & replace with line in other file
#5
Questions:
  • The only thing you want to replace are the headers, not the data, correct?
  • Also, the header text does not match exactly between files:
    Output:
    Original: Clavigralla_tomentosicollis_gi_512427643_gb_GAJX01006991.1[b]_0_rc[/b] Replacement: Clavigralla_tomentosicollis_gi_512427643_gb_GAJX01006991.1
  • How much is necessary to create unique match (I am assuming anything after the '.' is not part of the match)

Almost there give me another hour or so.
Reply


Messages In This Thread
RE: Help with python code to search string in one file & replace with line in other file - by Larz60+ - Dec-15-2017, 10:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot get cmd to print Python file Schauster 11 565 May-16-2024, 04:40 PM
Last Post: xMaxrayx
  Matching string from a file tester_V 5 559 Mar-05-2024, 05:46 AM
Last Post: Danishhafeez
  Python openyxl not updating Excel file MrBean12 1 429 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Python logging RotatingFileHandler writes to random file after the first log rotation rawatg 0 485 Feb-15-2024, 11:15 AM
Last Post: rawatg
  Unable to understand the meaning of the line of code. jahuja73 0 381 Jan-23-2024, 05:09 AM
Last Post: jahuja73
  connect sql by python using txt. file dawid294 2 537 Jan-12-2024, 08:54 PM
Last Post: deanhystad
  Writing a Linear Search algorithm - malformed string representation Drone4four 10 1,157 Jan-10-2024, 08:39 AM
Last Post: gulshan212
  file open "file not found error" shanoger 8 1,364 Dec-14-2023, 08:03 AM
Last Post: shanoger
  python Read each xlsx file and write it into csv with pipe delimiter mg24 4 1,701 Nov-09-2023, 10:56 AM
Last Post: mg24
  Search Excel File with a list of values huzzug 4 1,357 Nov-03-2023, 05:35 PM
Last Post: huzzug

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020