<jupyter_start><jupyter_text>Пример. Ссылка на визуализацию с помощью сервиса Carto:https://chrkv.carto.com/builder/5e80595c-b8ad-4d4f-929b-2cabd4787843/embed<jupyter_code># counting the number of restaurants available for each user

import operator

user_restaurant_number = dict((user_id, 0) for user_id in user_points.index)
for index_user, row_user in user_points.iterrows():
    for index_restaurant, row_restaurant in restaurant_points.iterrows():
        if row_user['geometry'].within(row_restaurant['geometry']) or row_restaurant['geometry'].touches(row_user['geometry']):
            user_restaurant_number[index_user] += 1
sorted_user_restaurant_number = dict(sorted(user_restaurant_number.items(), key=operator.itemgetter(1),reverse=True))
user_restaurant = pd.DataFrame.from_dict(sorted_user_restaurant_number, orient='index', columns=['number_of_places_available'])
print(user_restaurant)<jupyter_output>number_of_places_available
631                             1
2103                            1
7865                            1
0                               0
1                               0
...                           ...
11995                           0
11996                           0
11997                           0
11998                           0
11999                           0

[12000 rows x 1 columns]
{'fraction_non_alphanumeric': 0.07961309523809523, 'fraction_numerical': 0.057291666666666664, 'mean_word_length': 2.1062355658198615, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '599809', 'license': 'MIT', 'n_tokens_mistral': 444, 'n_tokens_neox': 402, 'n_words': 75, 'path': 'yandex_eda_users.restaurants.ipynb', 'repo_name': 'rmchrkv/yandex.eda', 'size': '1344'}