Skip to content

CLN: remove vestigial count code #6480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ def unique(values):
return _hashtable_algo(f, values.dtype)


# def count(values, uniques=None):
# f = lambda htype, caster: _count_generic(values, htype, caster)

# if uniques is not None:
# raise NotImplementedError
# else:
# return _hashtable_algo(f, values.dtype)


def _hashtable_algo(f, dtype):
"""
f(HashTable, type_caster) -> result
Expand All @@ -88,16 +79,6 @@ def _hashtable_algo(f, dtype):
return f(htable.PyObjectHashTable, com._ensure_object)


def _count_generic(values, table_type, type_caster):
from pandas.core.series import Series

values = type_caster(values)
table = table_type(min(len(values), 1000000))
uniques, labels = table.factorize(values)

return Series(counts, index=uniques)


def _match_generic(values, index, table_type, type_caster):
values = type_caster(values)
index = type_caster(index)
Expand Down