<jupyter_start><jupyter_text>Katakana Game Propotype2021/12/02<jupyter_code>import pandas as pd
data_path = "data/katakana-words.csv"
first_n_words = 3000
n_levels = 6
labels = [1,2,3,4,5,6]

df = pd.read_csv(data_path, nrows=first_n_words)
df['Level'] = pd.qcut(df['Frequency'], n_levels, labels=labels)
df.head()
cards = pd.DataFrame()

for level in labels:
    words = df[df['Level'] == level]
    words = words.sample(frac=1).reset_index()
    
    cards[f'Level {level}'] = words['Word']
    cards = cards.dropna()
    
cards<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15892857142857142, 'fraction_numerical': 0.03571428571428571, 'mean_word_length': 5.164835164835165, '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': '458454', 'license': 'MIT', 'n_tokens_mistral': 238, 'n_tokens_neox': 223, 'n_words': 39, 'path': 'prototype.ipynb', 'repo_name': 'andrematte/katakana-game', 'size': '560'}