<jupyter_start><jupyter_text>Добавляем имя компании<jupyter_code>with open("../data/egrul/parsed.json") as f:
    egrul = json.load(f)
inn2name = {}

for sample in egrul:
    inn2name[sample["inn"]] = sample["name"]
len(inn2name)
with open("inn2name.json", "w") as f:
    json.dump(inn2name, f)
df["name"] = df["inn"].map(lambda x: inn2name[str(x)] if str(x) in inn2name else None)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18004866180048662, 'fraction_numerical': 0.0170316301703163, 'mean_word_length': 5.754098360655738, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '95834', 'license': 'MIT', 'n_tokens_mistral': 174, 'n_tokens_neox': 176, 'n_words': 33, 'path': 'notebooks/sorting.ipynb', 'repo_name': 'ServerHack-The-First-Law-Of-Robotics/data_engineering', 'size': '411'}