<jupyter_start><jupyter_text>Sacar edad a partir de una fecha<jupyter_code>from datetime import datetime,timedelta
from dateutil.relativedelta import relativedelta

def edad(date_str):
    fecha = datetime.strptime(date_str, '%Y-%m-%d')
    hoy = datetime.now()
    age = relativedelta(hoy, fecha)
    print(age.years)
edad("2000-02-29")<jupyter_output>19
{'fraction_non_alphanumeric': 0.11830985915492957, 'fraction_numerical': 0.028169014084507043, 'mean_word_length': 5.592592592592593, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '12806', 'license': 'Apache-2.0', 'n_tokens_mistral': 147, 'n_tokens_neox': 139, 'n_words': 26, 'path': 'bbdd/Sacar edades.ipynb', 'repo_name': 'alberto402/StumForYou', 'size': '355'}