df:
Field1 Field2
1 2
3 4
5 6
1 7
3 8
请告诉我如何找到 df['Field1'] 的不同计数,结果应该是 3 在 SQL 中,我们使用这样的查询。
select count(distinct Field1) as Field1DistCount from df
请您参考如下方法:
df:
Field1 Field2
1 2
3 4
5 6
1 7
3 8
请告诉我如何找到 df['Field1'] 的不同计数,结果应该是 3 在 SQL 中,我们使用这样的查询。
select count(distinct Field1) as Field1DistCount from df
请您参考如下方法: