text_html_output_1.png
import pandas as pd

restdf = pd.read_pickle('../input/recommendationsyetemforrestraunts/restdf.pkl')
restdf = restdf.drop(columns=['address', 'city', 'state', 'postal_code', 'latitude', 'longitude', 'review_count', 'is_open', 'attributes', 'hours'])

tempdf = pd.read_pickle('../input/recommendationsyetemforrestraunts/tempdf.pkl')
tempdf = tempdf.drop(columns=['useful', 'funny', 'cool'])

tempdf.shape

users = tempdf.user_id.unique()
restraunts = tempdf.business_id.unique()
(len(users), len(restraunts))

userid2idx = {o: i for i, o in enumerate(users)}
restrauntid2idx = {o: i for i, o in enumerate(restraunts)}
(len(userid2idx), len(restrauntid2idx))