Python Forum
How to properly format rows and columns in excel data from parsed .txt blocks
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to properly format rows and columns in excel data from parsed .txt blocks
#8
I've tried to add an additional blank line to the end of the block description field in the pattern like this but when I add it, the excel file ends up being empty so I assume its because this pattern isn't recognized. There's always a blank line so I'm likely just formatting this extra empty line wrong.


block_pattern = re.compile(
    r"^(.*)\n"
    r"^Status: (.*)\n"
    r"^Event Category: (.*)\n"
    r"^Event Sub-Category: (.*)\n"
    r"^Added Date: (.*)\n"
    r"^Update Frequency: (.*)\n"
    r"^Language: (.*)\n"
    r"^Description: (.*)\n\*s\n",
    flags=re.MULTILINE)
Reply


Messages In This Thread
RE: How to properly format rows and columns in excel data from parsed .txt blocks - by jh67 - Dec-12-2022, 08:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Excel isnt working properly after python function is started IchNar 2 105 3 hours ago
Last Post: IchNar
  RSA Cipher with blocks Paragoon2 0 515 Nov-26-2023, 04:35 PM
Last Post: Paragoon2
  Export data from PDF as tabular format zinho 5 735 Nov-11-2023, 08:23 AM
Last Post: Pedroski55
  how do you style data frame that has empty rows. gsaray101 0 541 Sep-08-2023, 05:20 PM
Last Post: gsaray101
  Copy data from Excel and paste into Discord (Midjourney) Joe_Wright 4 2,102 Jun-06-2023, 05:49 PM
Last Post: rajeshgk
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,130 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Converting a json file to a dataframe with rows and columns eyavuz21 13 4,611 Jan-29-2023, 03:59 PM
Last Post: eyavuz21
  Comparing two columns with same value but different font format doug2019 1 734 Jan-08-2023, 02:58 PM
Last Post: Larz60+
  (Python) Pulling data from UA Google Analytics with more than 100k rows into csv. Stockers 0 1,255 Dec-19-2022, 11:11 PM
Last Post: Stockers
  Extracting Data into Columns using pdfplumber arvin 17 5,647 Dec-17-2022, 11:59 AM
Last Post: arvin

Forum Jump:

User Panel Messages

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