尝试使用ASCollectionDataSourceInterop
将UICollectionViewCell
和ASCellNode
合并到一个数据源中,如此处所述
但是我在这里遇到了问题,因为
func collectionView(_ collectionView: ASCollectionView, nodeForItemAt indexPath: IndexPath) -> ASCellNode {
return nil
}
无法在swift中工作,也许有一种方法可以在swift
中解决答案 0 :(得分:1)
找到了解决方案:只需将返回类型设为隐式展开的可选:
a=df['index_vec'].str.strip("[] ").str.split(",").explode()
s=pd.crosstab(a.index,a).reindex_like(df).fillna(0)
df=df.add(a)
编译器会警告您类型不匹配,但一切正常