Plotting the temperature difference
In this exercise, you'll continue to assess whether the dataset seems trustworthy by plotting the difference between the maximum and minimum temperatures.
What do you notice about the resulting histogram? Does it match your expectations, or do you see anything unusual?
Deze oefening maakt deel uit van de cursus
Analyzing Police Activity with pandas
Oefeninstructies
- Create a new column in the
weatherDataFrame namedTDIFFthat represents the difference between the maximum and minimum temperatures. - Print the summary statistics for
TDIFFusing the.describe()method. - Create a histogram with 20 bins to visualize
TDIFF. - Display the plot.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Create a 'TDIFF' column that represents temperature difference
# Describe the 'TDIFF' column
print(____)
# Create a histogram with 20 bins to visualize 'TDIFF'
# Display the plot