<jupyter_start><jupyter_text>Orservabdo las caracteristicas de los datos del IMSS se debe de proceder a juntar los elementos.<jupyter_code>df_2008.iloc[[8,9],2]
df_2008.iloc[[8,9],2].sum()
df_2008.iloc[[15,16],2]
df_2008.iloc[[15,16],2].sum()
df_2008.iloc[[31,32],2]
df_2008.iloc[[31,32],2].sum()
estados_republica = ['Aguascalientes','Baja California','Baja California Sur','Campeche','Chiapas','Chihuahua','Ciudad De Mexico',
 'Coahuila','Colima','Durango','Guanajuato','Guerrero','Hidalgo','Jalisco','Mexico','Michoacan','Morelos','Nayarit',
 'Nuevo Leon','Oaxaca','Puebla','Queretaro','Quintana Roo','San Luis Potosi','Sinaloa','Sonora','Tabasco','Tamaulipas',
 'Tlaxcala','Veracruz','Yucatan','Zacatecas']
diccionario_general = {
    'Id':list(range(1,33)),
    'Estados':estados_republica,
    'Total_Casos_Diabetes_2000':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2001':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2002':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2003':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2004':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2005':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2006':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2007':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2008':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2009':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2010':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2011':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2012':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2013':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2014':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2015':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2016':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2017':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2018':list(np.nan for i in range(0,32)),
    'Total_Casos_Diabetes_2019':list(np.nan for i in range(0,32)),
}
df_general = pd.DataFrame(diccionario_general)
df_general.head()
df_general.shape
df_auxiliar.iloc[0,0]
for i in range(2,len(df_general.columns)):
    df_general.iloc[0,i] = df_auxiliar.iloc[0,i-2]                #Aguascalientes
    df_general.iloc[1,i] = df_auxiliar.iloc[1,i-2]                #Baja California
    df_general.iloc[2,i] = df_auxiliar.iloc[2,i-2]                #Baja California Sur
    df_general.iloc[3,i] = df_auxiliar.iloc[3,i-2]                #Campeche
    df_general.iloc[4,i] = df_auxiliar.iloc[4,i-2]                #Chiapas   
    df_general.iloc[5,i] = df_auxiliar.iloc[5,i-2]                #Chihuahua
    df_general.iloc[6,i] = df_auxiliar.iloc[[8,9],i-2].sum()      #Ciudad de Mexico
    df_general.iloc[7,i] = df_auxiliar.iloc[6,i-2]                #Coahuila
    df_general.iloc[8,i] = df_auxiliar.iloc[7,i-2]                #Colima 
    df_general.iloc[9,i] = df_auxiliar.iloc[10,i-2]               #Durango
    df_general.iloc[10,i] = df_auxiliar.iloc[11,i-2]              #Guanajuato
    df_general.iloc[11,i] = df_auxiliar.iloc[12,i-2]              #Guerrero
    df_general.iloc[12,i] = df_auxiliar.iloc[13,i-2]              #Hidalgo
    df_general.iloc[13,i] = df_auxiliar.iloc[14,i-2]              #Jalisco
    df_general.iloc[14,i] = df_auxiliar.iloc[[15,16],i-2].sum()   #Mexico
    df_general.iloc[15,i] = df_auxiliar.iloc[17,i-2]              #Michoacan
    df_general.iloc[16,i] = df_auxiliar.iloc[18,i-2]              #Morelos
    df_general.iloc[17,i] = df_auxiliar.iloc[19,i-2]              #Nayarit
    df_general.iloc[18,i] = df_auxiliar.iloc[20,i-2]              #<NAME>
    df_general.iloc[19,i] = df_auxiliar.iloc[21,i-2]              #Oaxaca
    df_general.iloc[20,i] = df_auxiliar.iloc[22,i-2]              #Puebla
    df_general.iloc[21,i] = df_auxiliar.iloc[23,i-2]              #Queretaro
    df_general.iloc[22,i] = df_auxiliar.iloc[24,i-2]              #<NAME>
    df_general.iloc[23,i] = df_auxiliar.iloc[25,i-2]              #San Luis Potosi
    df_general.iloc[24,i] = df_auxiliar.iloc[26,i-2]              #Sinaloa
    df_general.iloc[25,i] = df_auxiliar.iloc[27,i-2]              #Sonora
    df_general.iloc[26,i] = df_auxiliar.iloc[28,i-2]              #Tabasco 
    df_general.iloc[27,i] = df_auxiliar.iloc[29,i-2]              #Tamaulipas
    df_general.iloc[28,i] = df_auxiliar.iloc[30,i-2]              #Tlaxcala
    df_general.iloc[29,i] = df_auxiliar.iloc[[31,32],i-2].sum()   #Veracruz
    df_general.iloc[30,i] = df_auxiliar.iloc[33,i-2]              #Yucatan
    df_general.iloc[31,i] = df_auxiliar.iloc[34,i-2]              #Zacatecas
    
len(df_general.columns)
df_2000
df_general
df_general.to_csv("Casos_Diabetes_IMSS.csv", index=False)
df_general.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15982853643600733, 'fraction_numerical': 0.07062665850173505, 'mean_word_length': 3.6095954844778926, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '170284', 'license': 'MIT', 'n_tokens_mistral': 2301, 'n_tokens_neox': 2072, 'n_words': 256, 'path': 'Imss_diabetes/ImssDiabetes.ipynb', 'repo_name': 'UPIITAalejandro/Proyecto_Terminal_2', 'size': '4908'}