19 lines
580 B
Python
19 lines
580 B
Python
stats = []
|
|
with open("data.csv", "r") as f:
|
|
lines_count = len(f.readlines())
|
|
stats.append(f"data.csv - {lines_count} lines\n")
|
|
|
|
with open("dev.csv", "r") as f:
|
|
lines_count = len(f.readlines())
|
|
stats.append(f"dev.csv - {lines_count} lines\n")
|
|
|
|
with open("test.csv", "r") as f:
|
|
lines_count = len(f.readlines())
|
|
stats.append(f"test.csv - {lines_count} lines\n")
|
|
|
|
with open("train.csv", "r") as f:
|
|
lines_count = len(f.readlines())
|
|
stats.append(f"train.csv - {lines_count} lines\n")
|
|
|
|
with open("stat.txt", "w+") as f:
|
|
f.writelines(stats) |