📌  相关文章
📜  在与另一列中的唯一值相对应的列中查找值的总和 python 代码示例

📅  最后修改于: 2022-03-11 14:46:27.891000             🧑  作者: Mango

代码示例1
group = df.groupby('author')

df2 = group.apply(lambda x: x['subreddit'].unique())

# Alternatively, same thing as a one liner:
# df2 = df.groupby('author').apply(lambda x: x['subreddit'].unique())