KOTA ITO

Generation

generate functionWed, 14 Dec 2022

csvファイルの中の、特定の列を、リストに変換する

def get_column(fname, col_num): col_list = [] with open(fname) as f: reader = csv.reader(f) col_list = [row[col_num] for row in reader] return col_list

Questions about programming?Chat with your personal AI assistant