Skip to content

Instantly share code, notes, and snippets.

View theodore-s-beers's full-sized avatar
🐢
Making slow progress

Theo Beers theodore-s-beers

🐢
Making slow progress
View GitHub Profile

Keybase proof

I hereby claim:

  • I am theodore-s-beers on github.
  • I am theobeers (https://keybase.io/theobeers) on keybase.
  • I have a public key ASDxgEIXnc83q4yF99GeRF3iM3KMUbLYtUynXxulouWLqQo

To claim this, I am signing this object:

@theodore-s-beers
theodore-s-beers / tsv_to_csv.py
Last active June 25, 2023 21:05
Convert a TSV file to CSV
with open("table.tsv", "r") as tsv_file:
with open("table.csv", "w") as csv_file:
for line in tsv_file:
# In my most recent use case, replacing commas with colons was suitable
new_line = line.replace(",", ":").replace("\t", ",")
csv_file.write(new_line)
print("Successfully converted to CSV")