<jupyter_start><jupyter_text>Loading Data Example<jupyter_code>import pyblp

pyblp.__version__<jupyter_output><empty_output><jupyter_text>Any number of functions can be used to load the example data into memory. In this example, we'll first use [NumPy](https://numpy.org/).<jupyter_code>import numpy as np
blp_product_data = np.recfromcsv(pyblp.data.BLP_PRODUCTS_LOCATION, encoding='utf-8')
blp_agent_data = np.recfromcsv(pyblp.data.BLP_AGENTS_LOCATION, encoding='utf-8')<jupyter_output><empty_output><jupyter_text>Record arrays can be cumbersome to manipulate. A more flexible alternative is the [pandas](https://pandas.pydata.org/) DataFrame. Unlike NumPy, pyblp does not directly depend on pandas, but it can be useful when manipulating data.<jupyter_code>import pandas as pd
blp_product_data = pd.read_csv(pyblp.data.BLP_PRODUCTS_LOCATION)
blp_agent_data = pd.read_csv(pyblp.data.BLP_AGENTS_LOCATION)<jupyter_output><empty_output><jupyter_text>Another benefit of DataFrame objects is that they display nicely in Jupyter notebooks.<jupyter_code>blp_product_data.head()
blp_agent_data.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09260908281389137, 'fraction_numerical': 0.0017809439002671415, 'mean_word_length': 8.21311475409836, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '5750', 'license': 'MIT', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 85, 'path': 'docs/notebooks/api/data.ipynb', 'repo_name': 'GloriaColmenares/pyblp', 'size': '1123'}