#For every row in the dataframe, iterate through the list of genres and place a 1 into the correspondingin row['genres']:#Filling in the NaN values with 0show that a movie doesn't have that column's genre
moviesW
我正在尝试用多个不同大小的列表填充两个pandas列。举个例子,我有一个列表,第一列是“血管成形术,主动脉,动脉”,第二列是"251,2882,401,4019,412“ 首先,我尝试像这样附加每个列表: matches.code_matches.appendobjs are valid 因此,我尝试将列表转换为序列,并使用以下代码将它们附加到dataframe: code_series = pd.Series( (v[0] for v in