<jupyter_start><jupyter_text>D1: Determine the Summary Statistics for June<jupyter_code># 1. Import the sqlalchemy extract function.
from sqlalchemy import extract
import pandas as pd

# 2. Write a query that filters the Measurement table to retrieve the temperatures for the month of June. 
june_temp = session.query(Measurement).filter(extract('month', Measurement.date) == 6)
#  3. Convert the June temperatures to a list.
june_temp_list = [temp.tobs for temp in june_temp]
# print(june_temp_list)
# 4. Create a DataFrame from the list of temperatures for the month of June. 
june_df = pd.DataFrame(june_temp_list, columns = ['temps'])
# june_df.head()
# 5. Calculate and print out the summary statistics for the June temperature DataFrame.
june_df.describe()<jupyter_output><empty_output><jupyter_text>D2: Determine the Summary Statistics for December<jupyter_code># 6. Write a query that filters the Measurement table to retrieve the temperatures for the month of December.
dec_temp = session.query(Measurement).filter(extract('month', Measurement.date) == 12)
# 7. Convert the December temperatures to a list.
dec_temp_list = [temp.tobs for temp in dec_temp]
# 8. Create a DataFrame from the list of temperatures for the month of December. 
dec_df = pd.DataFrame(dec_temp_list, columns = ['temps'])
# dec_df.head()
# 9. Calculate and print out the summary statistics for the Decemeber temperature DataFrame.
dec_df.describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08350444900752908, 'fraction_numerical': 0.009582477754962354, 'mean_word_length': 5.556053811659193, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '490479', 'license': 'MIT', 'n_tokens_mistral': 461, 'n_tokens_neox': 432, 'n_words': 166, 'path': 'SurfsUp_Challenge.ipynb', 'repo_name': 'shinigami423/surfs_up', 'size': '1461'}