Questions tagged «qlikview»

6
像Qlik中那样在pandas数据框中的列中计算唯一值?
如果我有这样的表: df = pd.DataFrame({ 'hID': [101, 102, 103, 101, 102, 104, 105, 101], 'dID': [10, 11, 12, 10, 11, 10, 12, 10], 'uID': ['James', 'Henry', 'Abe', 'James', 'Henry', 'Brian', 'Claude', 'James'], 'mID': ['A', 'B', 'A', 'B', 'A', 'A', 'A', 'C'] }) 我可以count(distinct hID)在Qlik中提出5个唯一的hID。我该如何在Python中使用Pandas数据框?还是一个numpy数组?同样,如果这样做,count(hID)我将在Qlik中得到8。在大熊猫中做这件事的等效方法是什么?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.