Data analysis from a CSV file in Python