标签:填充 loading ima sep image gen data read mic
Pandas的Merge相当于sql的join,将不同的表关联在一个表
df_ratings=pd.read_csv(r‘...\datas\movielens-1m\ratings.dat‘,sep=‘::‘,engine=‘python‘,names=‘UserID::MovieID::Rating::Timestamp‘.split(‘:??)
df_users=pd.read_csv(r‘...\datas\movielens-1m\users.dat‘,sep=‘::‘,engine=‘python‘,names=‘UserID::Gender::Age::Occupation::Zip-code‘.split(‘:??)
df_ratings_users_movie=pd.merge(df_ratings,df_users,left_on=‘UserID‘,right_on=‘UserID‘,how=‘inner‘)
注意合并后,其没有的值则默认填充为NaN
标签:填充 loading ima sep image gen data read mic
原文地址:https://www.cnblogs.com/hisweety/p/13357032.html