编程语言
首页 > 编程语言> > python合并俩列Series

python合并俩列Series

作者:互联网

import pandas as pd import csv path='test.csv' data=pd.read_csv(path) x=data['label'] xt=x.drop_duplicates( keep='first', inplace=False) path1='val.csv' data1=pd.read_csv(path1) x1=data1['label'] xv=x1.drop_duplicates( keep='first', inplace=False) xt=xt.to_frame() xv=xv.to_frame() w=pd.concat([xt, xv], axis=0)

标签:python,Series,frame,合并,duplicates,pd,csv,xv,xt
来源: https://www.cnblogs.com/hahaah/p/16579617.html