<jupyter_start><jupyter_text>Compare June and December data across all years<jupyter_code>from scipy import stats
hawaii_measurements=pd.read_csv('Instructions/Resources/hawaii_measurements.csv')
hawaii_stations=pd.read_csv('Instructions/Resources/hawaii_stations.csv')
hawaii_measurements.head()
# Filter data for Jun and December

avg_june_temp=hawaii_measurements[hawaii_measurements['date'].str.slice(start=5, stop=7)=='06'].groupby(hawaii_measurements['station']).mean()
avg_dec_temp=hawaii_measurements[hawaii_measurements['date'].str.slice(start=5, stop=7)=='12'].groupby(hawaii_measurements['station']).mean()
# Identify the average temperature for June
avg_june_temp['tobs']
# Identify the average temperature for December
avg_dec_temp['tobs']
# Run paired t-test

import scipy.stats as stats
stats.ttest_ind(avg_june_temp['tobs'], avg_dec_temp['tobs'], equal_var=False)<jupyter_output><empty_output><jupyter_text>Analysis<jupyter_code># the p-value is 0.000366 < 0.05.
# Based on the t-test result, we reject the null hypothesis.
# We conclude that the average temperature in June 
# is significantly different than the average temperature in December in Hawaii.<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11314475873544093, 'fraction_numerical': 0.014975041597337771, 'mean_word_length': 9.025, 'pattern_counts': {'":': 0, '<': 10, '<?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': '462829', 'license': 'ADSL', 'n_tokens_mistral': 428, 'n_tokens_neox': 403, 'n_words': 82, 'path': 'temp_analysis_bonus_1.ipynb', 'repo_name': 'Avocadott93/sqlalchemy-challenge', 'size': '1202'}