Dataframe根据某一列的值获取满足条件的行的其他列的值
from pandas.core.frame import DataFrame
ls_id = ['1', '2', '3', '4']
ls_score = [89, 65, 73, 94]
df = DataFrame({'id': ls_id, 'score': ls_score}) # 用列表构造Dataframe
print(df)
print('----------------------')
df_id_column = df.id.copy()
print('df_id_column的类型为: ',type(df_id_column))
print(df_id_column.values)
print('----------------------')
print('输出id为3的score:')
print(df.loc[df['id']=='3','score'])