>>> import pandas as pd >>> from bd_arbres import gran_arbre --ini-enunciat >>> df = pd.read_csv('arbres.csv', index_col='Tree_ID') >>> nomc, diam, alt = gran_arbre(df, 'Santry', 'Dead') >>> print(nomc, '---', diam, '---', alt) Myrobalan (Purple) Plum --- 34.0 --- 5.1-10 >>> nomc, diam, alt = gran_arbre(df, 'Lusk', 'Good') >>> print(nomc, '---', diam, '---', alt) Silver Maple --- 313.0 --- 5.1-10 --fi-enunciat >>> t = gran_arbre(df, 'Westmanstown', 'Fair to Good') >>> isinstance(t, tuple) # Comprova si el valor retornat és una tupla True >>> nomc, diam, alt = t >>> print(nomc, '---', diam, '---', alt) Common Beech --- 81.0 --- > 20.1 >>> for e in ['Good', 'Fair - Poor', 'Fair to Good', 'Fair', 'Poor', 'Dead']: ... nomc, diam, alt = gran_arbre(df, 'Howth', e) ... print(nomc, '---', diam, '---', alt) Elm --- 55.0 --- 15.1-20 Whitebeam --- 40.0 --- 5.1-10 Elm --- 60.0 --- 10.1- 15 Elm --- 67.0 --- 15.1-20 Norway Maple --- 44.0 --- Up to 5 Stump --- 29.0 --- 5.1-10