Menu

Analyzing Average Temperature

Analyzing Average Temperature

Temperature is one of the most important weather indicators.

To calculate the average temperature across all observations:

Code

avg_temp = df['Temperature (C)']. mean()

print("Average Temperature:", avg_temp)

Explanation

The mean() function calculates the average value of the temperature column.

Example Output:

Average Temperature: 27.4°C

Insight

The average temperature provides a baseline understanding of the climate represented in the dataset.