def loadAndUpdate(pathTrain, pathTest, featureStruct=featUp.generateFeatureStruct()): usersTrain = pd.read_csv(pathTrain) yRes = pd.DataFrame(usersTrain['country_destination']) usersTrain = usersTrain.drop('country_destination', axis=1) usersTest = pd.read_csv(pathTest) users = pd.concat([usersTrain, usersTest], ignore_index=True) for feature in featureStruct: feature.update(users) yFeat = featUp.countriesFeature() yFeat.update(yRes) return users, yRes, usersTrain, usersTest
def loadAndUpdateFeatures(path, featureStruct=featUp.generateFeatureStruct()): users = pd.read_csv(path) for feature in featureStruct: feature.update(users) return users