<jupyter_start><jupyter_text>Working with pointsets Connect to Petrel<jupyter_code>from blueback.pythontool.grpc.petrelconnection import PetrelConnection
port_number = 40129
petrel = PetrelConnection(port_number)
petrel.open()<jupyter_output><empty_output><jupyter_text>Retrieve a list of pointsets as Python dictionary<jupyter_code>petrel.pointsets
all_pointsets_dict = petrel.pointsets
all_pointsets_paths = petrel.pointsets.keys()
paths = list(all_pointsets_paths)
mypointset = petrel.pointsets[paths[0]]
print(mypointset)<jupyter_output><empty_output><jupyter_text>Load pointset attribute into a dataframe<jupyter_code>mypointsetattribute=mypointset.as_dataframe()
mypointsetattribute<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08217270194986072, 'fraction_numerical': 0.008356545961002786, 'mean_word_length': 12.826923076923077, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '556480', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 254, 'n_tokens_neox': 245, 'n_words': 36, 'path': 'Notebooks/example_pointset.ipynb', 'repo_name': 'cegaldev/Cegal-Python-Tool-Pro', 'size': '718'}