def _cast_and_set(self, key, value, config):
        default_value = config.get(key)

        if isinstance(default_value, bool):  # bool is a subclass of int so should be checked first
            value_mapping = {'true': True, 'false': False}
            if not isinstance(value, str) and value.lower() not in value_mapping.keys():
                raise InvalidConfigError('The value for {} should be True or False, but it is "{}"'.format(key, value))
            config.set(key, value_mapping[value.lower()])

        elif isinstance(default_value, int):
            config.set(key, int(value))

        elif isinstance(default_value, list):
            # The ConfigObj library converts comma delimited strings to lists.  In the case on a single element, we
            # need to do the conversion ourselves.
            if not isinstance(value, list):
                value = [value]
            config.set(key, value)

        else:  # Could be str or NoneType, we assume it should be a str
            # Hacky: If the value starts with ~, we assume it's a path that needs to be expanded
            if value.startswith('~'):
                value = expanduser(value)
            config.set(key, value)
loads a datasaet (from in-modules datasets) in a dataframe data structure.
dataset/ETHPy150Open box/ClusterRunner/app/util/conf/base_config_loader.py/BaseConfigLoader._cast_and_set--crossover with--dataset/ETHPy150Open iamaziz/PyDataset/pydataset/__init__.py/data