题解 | #快递站点信息#
快递站点信息
https://www.nowcoder.com/practice/c32d54b505c44133a575cb02993d0835
import sys ''' for line in sys.stdin: a = line.split() print(int(a[0]) + int(a[1])) ''' import pandas as pd df = pd.read_csv('Nowcoder.csv',dtype = object) list1 = ['Destination'] print(df['Destination'][(df.Type=='1') & (df.Date == '2022/6/18')]) #print(df1)
第11行如果
df['Destination'][(df.Type=='1') & (df.Date == '2022/6/18')]
改为 df[list1][(df.Type=='1') & (df.Date == '2022/6/18')]
就会输出dataframe格式的数据,就不对了