def __init__(self, fname): super(TestsForPredicciones, self).__init__() self.data = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/6.predicciones_prueba/predicciones_modelo.csv') #Con esta FALLA la prueba #self.data = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/2.separacion_base/y_test.csv') self.df_inicial= funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/2.separacion_base/X_test.csv') self.df_final = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(fname))
def __init__(self, file1, file2, file3): super(TestFeatureEngineeringMarbles, self).__init__() #3.imputaciones/X_info_mensual_mes_4_ano_2020.csv self.data_procesada_info_mensual= funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file1)) #1.preprocesamiento/base_procesada.csv self.data_procesada = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file2)) #3.imputaciones/X_train self.data_entrenamiento = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file3))
def __init__(self, file1, file2, file3, file4): #3.imputaciones/X_info_mensual_mes_4_ano_2020.csv self.data_procesada_antes_OneHoteEncoder_info_mensual= funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file1)) #4.input_modelo/X_info_mensual_mes_4_ano_2020.csv self.data_procesada_despues_OneHoteEncoder_info_mensual= funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file2)) #3.imputaciones/X_train.csv self.data_entrenamiento_antes_OneHoteEncoder = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file3)) #4.input_modelo/X_train_input.csv self.data_entrenamiento_despues_OneHoteEncoder= funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/{}'.format(file4))
def __init__(self, fname): #Buscamos el archivo del bucket en la S3 self.data = funciones_s3.abre_file_como_df('dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/1.preprocesamiento/base_procesada.csv') host = funciones_rds.db_endpoint('db-dpa20') connection = funciones_rds.connect( 'db_incidentes_cdmx', 'postgres', 'passwordDB', host) #cleaned.IncidentesVialesInfoMensual self.dataframe = psql.read_sql("SELECT * FROM {};".format(fname), connection)
def setUp(self): """ Your setUp """ try: data = funciones_s3.abre_file_como_df( 'dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/1.preprocesamiento/base_procesada.csv') except IOError: print('cannot open file') self.unicos = data['incidente_c4_rec'].nunique()
def setUpClass(cls): """ Your setUp """ try: data = funciones_s3.abre_file_como_df( 'dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/1.preprocesamiento/base_procesada.csv') except IOError: print('cannot open file', IOError) cls.unicos = data['incidente_c4_rec'].nunique() cls.column1 = data['delegacion_inicio']
def setUp(self): """ Your setUp """ try: data = funciones_s3.abre_file_como_df( 'dpa20-incidentes-cdmx', 'bucket_incidentes_cdmx/1.preprocesamiento/base_procesada.csv') except IOError: print('cannot open file') self.column1 = data['delegacion_inicio']