Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Lista cech
- features = [
- "petal length (cm)",
- "petal width (cm)"
- ]
- # Gatunki
- species = iris.target_names
- # Tworzenie tabeli wyników
- results = []
- for feature in features:
- for specie in species:
- data = df_test[df_test['species'] == specie][feature]
- results.append({
- "Feature": feature,
- "Species": specie,
- "Minimum": 0.8 * data.min(),
- "Maximum": 1.2 * data.max(),
- "Mean": data.mean()
- })
- # DataFrame z wynikami
- summary_df = pd.DataFrame(results)
- # Wyświetlenie tabeli
- print(summary_df)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement