标签: pandas
我想依靠我的pandas DataFrame的两列并相应地标记这些计数,就像我对表中的以下sql查询执行的方式一样:
select dim1, dim2, count(distinct dim3) as count_dim3, count(distinct dim4) as count_dim4 from my_table group by dim1, dim2