YouTuberとしておさえるべきポイントとは?
senkin13
# use predicted dislikes,likes,comment_out dislikes_pred = pd.read_csv('dislikes_pred_0623.csv') likes_pred = pd.read_csv('likes_pred_0623.csv') comments_pred = pd.read_csv('comment_count_pred_0623.csv') df = df.merge(dislikes_pred,on=['video_id'],how='left') df = df.merge(likes_pred,on=['video_id'],how='left') df = df.merge(comments_pred,on=['video_id'],how='left') df['diff_dislikes'] = df['dislikes'] - df['dislikes_pred'] df['diff_likes'] = df['likes'] - df['likes_pred'] df['diff_comments'] = df['comment_count'] - df['comment_count_pred'] df['original_dislikes'] = df['dislikes'] df['original_likes'] = df['likes'] df['original_comment_count'] = df['comment_count'] df.loc[df['ratings_disabled']==True,'dislikes'] = df.loc[df['ratings_disabled']==True,'dislikes_pred'] df.loc[df['ratings_disabled']==True,'likes'] = df.loc[df['ratings_disabled']==True,'likes_pred'] df.loc[df['comments_disabled']==True,'comment_count'] = df.loc[df['comments_disabled']==True,'comment_count_pred']
※コードにはファイル名に項番を降ってありますので項番順(同一項番は順不同)に動作させる必要があります。全コードを動作させると、(CPU: 32コア/GPU: RTX2080Ti x 1)で延べ12〜13時間程度を要します。