<jupyter_start><jupyter_text>Bonus: Temperature Analysis I<jupyter_code>import pandas as pd
from datetime import datetime as dt
# "tobs" is "temperature observations"
df = pd.read_csv('Resources/hawaii_measurements.csv')
df.head()
# Convert the date column format from string to datetime
df['date']= pd.to_datetime(df['date'])
# Set the date column as the DataFrame index
# df.set_index('date', inplace=True)
# df.head()
# Drop the date column
# df.reset_index(drop=True, inplace=True)
# df.head()<jupyter_output><empty_output><jupyter_text>Compare June and December data across all years<jupyter_code>from scipy import stats
# Filter data for desired months
June_df = df.loc[df['date'].dt.month == 6]
December_df = df.loc[df['date'].dt.month == 12]
# Identify the average temperature for June
avg_temp_june = June_df["tobs"].mean()
round(avg_temp_june, 2)
# Identify the average temperature for December
avg_temp_dec = December_df["tobs"].mean()
round(avg_temp_dec, 2)
# Run paired t-test
stats.ttest_ind(June_df["tobs"], December_df["tobs"], equal_var=False)<jupyter_output><empty_output><jupyter_text>Analysis<jupyter_code># The difference in the means is clearly not statistically significant (p-value = 4.19 > 0.05).  A paired t-test was used 
# because most factors were similiar (locations, test type, testing equipment, testing frequency, etc...).  
# Ceteris paribus, meaning all other things constant.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1179736294240111, 'fraction_numerical': 0.007633587786259542, 'mean_word_length': 6.589473684210526, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '251951', 'license': 'ADSL', 'n_tokens_mistral': 492, 'n_tokens_neox': 468, 'n_words': 134, 'path': 'temp_analysis_bonus_1.ipynb', 'repo_name': 'RCC0149/sqlalchemy-challenge', 'size': '1441'}