转成字典
a = ['key1', 'key2', 'key3']
b = ['1', '2', '3']
data = pd.DataFrame(zip(a, b), columns=['project', 'attribute'])
print(data)
dict_country = data.set_index('project').T.to_dict()
dict_country = data.set_index('project').T.to_dict('list')
print(dict_country)
过滤
ret_df = df.loc[df['列名'] == '列值']
索引去重
print(ret_df[ret_df.index.duplicated()])