def get_words(self, n: int, distribution: str='weighted'):
    'Selects and returns a sample of words and their genders.\n\n        Args:\n            n (int): The number of results wanted.\n            distribution (str): The sampling method to use. Either `uniform` or\n                `weighted`.\n\n        Yields:\n            A tuple of strings in the format (word, gender).\n        '
    if (distribution == 'uniform'):
        sample = self.words.sample(n=n)
    elif (distribution == 'weighted'):
        sample = self.words.sample(n=n, weights='Weight')
    else:
        raise ValueError(f'Unknown value for distribution: {distribution}')
    for row in sample.iterrows():
        (yield (row[0], row[1].Gender))
Selects and returns a sample of words and their genders.

Args:
    n (int): The number of results wanted.
    distribution (str): The sampling method to use. Either `uniform` or
        `weighted`.

Yields:
    A tuple of strings in the format (word, gender).
def get_words(self, n: int, distribution: str='weighted'):
    'Selects and returns a sample of words and their genders.\n\n        Args:\n            n (int): The number of results wanted.\n            distribution (str): The sampling method to use. Either `uniform` or\n                `weighted`.\n\n        Yields:\n            A tuple of strings in the format (word, gender).\n        '
    if (distribution == 'uniform'):
        sample = self.words.sample(n=n)
    elif (distribution == 'weighted'):
        sample = self.words.sample(n=n, weights='Weight')
    else:
        raise ValueError(f'Unknown value for distribution: {distribution}')
    for row in sample.iterrows():
        (yield (row[0], row[1].Gender))