题解 | #快递站点信息#
快递站点信息
https://www.nowcoder.com/practice/c32d54b505c44133a575cb02993d0835
loc可以混合取行列名字,iloc只能混合取行列索引,因此用loc就行,
import pandas as pd
df = pd.read_csv('Nowcoder.csv', sep=',',
dtype={'order_num':str,
'Postage':str,
'Date':str,
'Destination':str,
'phone_tail_number':str,
'Type':int})
print(df.loc[(df['Type'] == 1) & (df['Date'] == '2022/6/18'),'Destination'])