本文整理匯總了Python中pandas._libs.hashtable.duplicated_int64方法的典型用法代碼示例。如果您正苦於以下問題:Python hashtable.duplicated_int64方法的具體用法?Python hashtable.duplicated_int64怎麽用?Python hashtable.duplicated_int64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pandas._libs.hashtable
的用法示例。
在下文中一共展示了hashtable.duplicated_int64方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: duplicated
# 需要導入模塊: from pandas._libs import hashtable [as 別名]
# 或者: from pandas._libs.hashtable import duplicated_int64 [as 別名]
def duplicated(self, keep='first'):
from pandas._libs.hashtable import duplicated_int64
codes = self.codes.astype('i8')
return duplicated_int64(codes, keep)
示例2: duplicated
# 需要導入模塊: from pandas._libs import hashtable [as 別名]
# 或者: from pandas._libs.hashtable import duplicated_int64 [as 別名]
def duplicated(self, keep='first'):
from pandas.core.sorting import get_group_index
from pandas._libs.hashtable import duplicated_int64
shape = map(len, self.levels)
ids = get_group_index(self.codes, shape, sort=False, xnull=False)
return duplicated_int64(ids, keep)
示例3: duplicated
# 需要導入模塊: from pandas._libs import hashtable [as 別名]
# 或者: from pandas._libs.hashtable import duplicated_int64 [as 別名]
def duplicated(self, keep='first'):
from pandas.core.sorting import get_group_index
from pandas._libs.hashtable import duplicated_int64
shape = map(len, self.levels)
ids = get_group_index(self.labels, shape, sort=False, xnull=False)
return duplicated_int64(ids, keep)