<jupyter_start><jupyter_text>Generate Gbif catergoricals data used to tag scientific papers with species, family, or genus<NAME><jupyter_code>import sys
sys.path.append('../base_open_source')

from data_base_exploration import read_gbif_extract_csvCategorical
dg = read_gbif_extract_csvCategorical()
print(dg.shape, list(dg.columns))
print(dg['rank'].unique())
display(dg.head())

print('rank== family')
display(dg[dg['rank']=='family'].head())


print('rank== genus')
display(dg[dg['rank']=='genus'].head())

print('rank== species or subspecies')
display(dg[(dg['rank']=='species') | (dg['rank']=='subspecies')].head())<jupyter_output>(99824, 3) ['key', 'name', 'rank']
['family' 'genus' 'species' 'subspecies']
{'fraction_non_alphanumeric': 0.20224719101123595, 'fraction_numerical': 0.008426966292134831, 'mean_word_length': 9.96923076923077, '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': '336433', 'license': 'MIT', 'n_tokens_mistral': 271, 'n_tokens_neox': 244, 'n_words': 46, 'path': 'notebooks/20201129 - Generate Gbif categorcal data used to tag scientific papers.ipynb', 'repo_name': 'timtonthat/batch8_ceebios', 'size': '724'}