These are chat archives for data-8/datascience

15th
Dec 2015
Carl Boettiger
@cboettig
Dec 15 2015 00:51
Hi folks, silly question, looking how to count the number of re-occuring values in a column of a table
Carl Boettiger
@cboettig
Dec 15 2015 01:17
e.g. could convert to table.to_df()['column'].value_counts()
Stefan van der Walt
@stefanv
Dec 15 2015 03:42
I haven’t tested this, but I guess something like len(np.unique(table[‘column’]))) would also work
Sam Lau
@SamLau95
Dec 15 2015 03:44
@cboettig you could do
from collections import Counter
Counter(table['column'])