I am trying to call a CSV File , and creating a new column based on truncated strings of an existing column using Python.
I have :
import csv
from collections import defaultdict
columns = defaultdict(list)
with open('file.txt') as f:
for (k,v) in row.items():
columns[k].append(v)