Created
November 18, 2024 14:07
-
-
Save david-botelho-mariano/1096183d9eea53f1017c9ad62f2a16f3 to your computer and use it in GitHub Desktop.
privy table to css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
with open("summary.txt", 'r') as file: | |
lines = file.readlines() | |
with open("summary.csv", 'w', newline='', encoding='utf-8') as csvfile: | |
csv_writer = csv.writer(csvfile) | |
for line in lines: | |
try: | |
line_array = line.split("│") | |
line_array.pop(0) | |
line_array.pop(-1) | |
stripped_line_array = [s.strip() for s in line_array] | |
csv_writer.writerow(stripped_line_array) | |
except Exception as e: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment