import pandas as pd
pd.merge(dataframe1,dataframe2,on=‘common_field‘,how=‘outer‘)
replace NaN
dataframe1.fillna(0)
#
replace NaN to 0
transform from dataframe to Numpy array np.array(dataframe[‘column‘])
原文:http://www.cnblogs.com/kiddy/p/4519060.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!