<jupyter_start><jupyter_text>Pubs  Parameters<jupyter_code>BASE_DIR = '/Users/efraflores/Desktop/EF/Contests/Datathon_202109/data/datos'
CP_FILE = 'Canarias_CP.csv'
FOLDER_NAME = 'CM05'
FROM_YEAR = 2018
TO_YEAR = 2021<jupyter_output><empty_output><jupyter_text>Import<jupyter_code>from mariachis.models import Weather

we = Weather(BASE_DIR, CP_FILE, FOLDER_NAME, FROM_YEAR, TO_YEAR)
print(we)<jupyter_output>Folder path:	/Users/efraflores/Desktop/EF/Contests/Datathon_202109/data/datos/CM05
With 10 files about daily weather between 2018 and 2021<jupyter_text>Transform<jupyter_code>df, pipe_obj= we.full_pipeline_weather(cluster_kwargs={'n_clusters':6, 'kmeans':True}, index=['comunity_code'], columns=['indicador','mes'], aggfunc={'valor':['count','mean','median','min','max']}, fill_value=0)
print(len(df))
df.sample()<jupyter_output>29<jupyter_text>Profiles<jupyter_code>from mariachis.utils import profiles

prof = profiles(df[['cluster']].join(df.filter(like='mean')))

for var in prof.values():
    display(var.fillna(0).style.format("{:.2f}").background_gradient('Blues'))<jupyter_output><empty_output><jupyter_text>Export<jupyter_code>we.export_result(df, 'Finished_weather.csv')<jupyter_output>Exported succesfully!
File:	Finished_weather.csv
Path:	/Users/efraflores/Desktop/EF/Contests/Datathon_202109/data/datos
{'fraction_non_alphanumeric': 0.1510574018126888, 'fraction_numerical': 0.03474320241691843, 'mean_word_length': 10.62280701754386, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '641328', 'license': 'Apache-2.0', 'n_tokens_mistral': 558, 'n_tokens_neox': 514, 'n_words': 58, 'path': 'datathon2021/notebooks/01_Weather.ipynb', 'repo_name': 'Afroefras/datathon2021', 'size': '1324'}