# How to do binning in matrix data

I have some data like

     hr1 hr2 hr3 hr4 hr5 hr6 hr7
usr1 1  0   0   0   0   0   0
usr2 0  1   1   0   0   0   0
usr3 0  1   0   0   0   0   0
usr4 1  0   0   0   0   0   0
usr5 1  1   1   1   1   1   1



How to categorize this data in bins like hr1-hr3 and hr4-hr7 or any other bins

• Please clarify the question.Do you want to count the total by column? And in which language at least? May 13, 2022 at 10:11
• You can use the Hamming distance and some clustering algorithm. May 20, 2022 at 9:46