import pandas as pdpd.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‘])
时间: 2024-11-07 19:28:15
import pandas as pdpd.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‘])