3 ms·
Amusing to see "dos2unix" pop up in the middle of the article. Python and Pandas can handle newlines directly, one pattern is: with open("gametimes.csv", "r"
by badlibrarian 1y ago
Amusing to see "dos2unix" pop up in the middle of the article. Python and Pandas can handle newlines directly, one pattern is:
with open("gametimes.csv", "r", newline="") as f:
df = pd.read_csv(f)
- zahlman 1y agoThe standard library `csv` used to expect files in binary mode in 2.x and it annoyed me to no end.