Skip to content

Instantly share code, notes, and snippets.

@n1ckfg
Created March 27, 2024 22:30
Show Gist options
  • Save n1ckfg/8481140f1989d13023482a0c0b3d1950 to your computer and use it in GitHub Desktop.
Save n1ckfg/8481140f1989d13023482a0c0b3d1950 to your computer and use it in GitHub Desktop.
import csv
with open("tiltset_credits_unique_13908_cleaned.csv", "r") as file:
csv_reader = csv.reader(file)
extra_comma_counter = 0
for i, line in enumerate(csv_reader):
num_commas = len(line) - 1
if (num_commas > 1):
print(str(num_commas) + " commas found in line " + str(i + 1))
extra_comma_counter += 1
print("~ ~ ~ ~ ~ ~ ~ ~ ~ ~")
print(str(extra_comma_counter) + " extra commas found.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment