liste_products = df_cleaned['Description'].unique()
X = pd.DataFrame()
for key, occurence in list_products:
X.loc[:, key] = list(map(lambda x:int(key.upper() in x), liste_products))
抛出错误
TypeError Traceback (most recent call last)
<ipython-input-181-6d04c94ad6e2> in <module>
X = pd.DataFrame()
for key, occurence in list_products:
----> X.loc[:, key] = list(map(lambda x:int(key.upper() in x), liste_products))
TypeError: 'DataFrame' object is not callable