c(
  min = min(iris$Petal.Length),
  max = max(iris$Petal.Length),
  mean = mean(iris$Petal.Length)
)
##   min   max  mean 
## 1.000 6.900 3.758
iris_mean <- iris %>%
  group_by(Species) %>%
  summarise(tb_cr = mean(Petal.Width))

ggplot(iris_mean, aes(x = Species, y = tb_cr)) +
  geom_col()

import pandas as pd

# Nhận dữ liệu iris từ R
iris = r.iris

# Lọc Sepal.Length > 6.0 và tính trung bình Petal.Width
mean_petal_width = iris[iris['Sepal.Length'] > 6.0]['Petal.Width'].mean()

print("Gtri tb của PW là:", mean_petal_width)
## Gtri tb của PW là: 1.8475409836065577