Created
August 23, 2023 02:11
-
-
Save LadyKerr/0ee164ccfe6f05f77c812bd6ecbc3fb6 to your computer and use it in GitHub Desktop.
Convert TSV to CSV with Python - code generated by GitHub Copilot
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('ruby-study-guide.tsv', 'r') as tsvfile: | |
reader = csv.reader(tsvfile, delimiter='\t') | |
with open('ruby-study-guide.csv', 'w') as csvfile: | |
writer = csv.writer(csvfile) | |
for row in reader: | |
writer.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To convert TSV to CSV with this script:
.py
extension. For example,tsv_to_csv.py
python [[name of your file]]
. For example,python tsv_to_csv.py
and cick enterA note:
I was able to generate this code with the help of GitHub Copilot Chat. See conversation below: