How to calculate similarity between categorical variables in collaborative filtering
Cosine similarity will handle the problem as a whole vector which includes all values of the variable. And may not give the answer for correlation. So when you received a good score from cosine similarity, it will not make sure they are also correlated.
I am trying to build a recommender system using collaborative filtering.

I am having user-item dataset. I am unable to find similarity between similar user, since i cannot use  Euclidean / Cosine distance will not work here. 
If i convert categorical variable into 0, 1 then will not able to calculate distance.
Can you please suggest any recommendation algorithm in python which handles categorical data.