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

# 2. Write a query that filters the Measurement table to retrieve the temperatures for the month of June. 
results = []
results = session.query(Measurement.date, Measurement.tobs).filter(extract('month', Measurement.date) == 6 )

#  3. Convert the June temperatures to a list.
june_temps_list = [i[1] for i in results.all()]
june_temps_list
# 4. Create a DataFrame from the list of temperatures for the month of June. 
df = pd.DataFrame(june_temps_list, columns = ['June Temps'])

df
# 5. Calculate and print out the summary statistics for the June temperature DataFrame.
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.
results = []
results = session.query(Measurement.date, Measurement.tobs).filter(extract('month', Measurement.date) == 12)
# 7. Convert the December temperatures to a list.
dec_temps_list = [i[1] for i in results.all()]
dec_temps_list
# 8. Create a DataFrame from the list of temperatures for the month of December. 
df = pd.DataFrame(dec_temps_list, columns=['Dec Temps'])
df
# 9. Calculate and print out the summary statistics for the Decemeber temperature DataFrame.
df.describe()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08857336037863421, 'fraction_numerical': 0.010818120351588911, 'mean_word_length': 5.434782608695652, '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': '132855', 'license': 'MIT', 'n_tokens_mistral': 465, 'n_tokens_neox': 434, 'n_words': 168, 'path': 'SurfsUp_Challenge.ipynb', 'repo_name': 'Lydiadel/Surfs_up', 'size': '1479'}