Python做数据处理之多列转一列

这是一个csv文件,样例数据如下:
cl1 cl2 cl3
1 0 0
0 0 1
0 1 0
因为有多个cloumn,1只会在一行中出现一次,想根据1出现的位置得到列名组合成一列
期望结果:
cltp
cl1
cl3
cl2
python初学,请高手指教~

import csv
rest = []
with open('test.csv') as f:
f_csv = csv.DictReader(f)
for line in f_csv:
for k,v in line.items():
if int(v) == 1:
rest.append(k)
break
print "rest:",rest