<jupyter_start><jupyter_text>Read S&P 500 company information from wikipedia<jupyter_code>import pandas as pd

html = pd.read_html("https://en.wikipedia.org/wiki/List_of_S%26P_500_companies")
sp500Companies = html[0] # list 1st table data
sp500Companies<jupyter_output><empty_output><jupyter_text>Sort by Symbol<jupyter_code>sp500Companies.sort_values("Symbol")<jupyter_output><empty_output><jupyter_text>Sort by Central Index Key (CIK)<jupyter_code>sp500Companies.sort_values("CIK")<jupyter_output><empty_output><jupyter_text>Sort by name<jupyter_code>sp500Companies.sort_values("Security")<jupyter_output><empty_output><jupyter_text>Sort by founded<jupyter_code>sp500Companies.sort_values("Founded")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11354309165526676, 'fraction_numerical': 0.038303693570451436, 'mean_word_length': 15.266666666666667, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '623765', 'license': 'MIT', 'n_tokens_mistral': 305, 'n_tokens_neox': 275, 'n_words': 30, 'path': 'MiniProjects/S&P_500_company_list.ipynb', 'repo_name': 'krishnamanchikalapudi/examples.py', 'size': '731'}