python如何合并两个dataframe

不使用merge

frame=frame[['waybill_code','operator_user_id','start_time','create_time','address', 'gpsDate', 'floors', 'unit','building_id','ddl_time']]
frame.rename(columns={'operator_user_id':'operator_id','create_time':'end_time'},inplace=True)
frame.head(2)

frame2['hour']=frame2['required_end_time'].str[14:19]
def bc(x):
    if x=='00:00':
        return 'bpick'
    else:
        return 'cpick'
frame2['type']=list(map(bc,list(frame2['hour'])))

df = frame.append(frame2,  ignore_index=True).reset_index(drop=True)
print(len(df))

你可能感兴趣的:(python,python)