src/create_clean_data.py
def create_clean_data():
    """
    Master function which takes all raw series, cleans them,
    and outputs to a flat file
    """
    # Get config file
    config = utils.read_config()
    # Create empty list for vector of dataframes
    df_vec = []
    for key in list(config['timeSeries'].keys()):
        df_vec.append(clean_ons_time_series(key, *config['timeSeries'][key]))
    # Put this into tidy format
    df = pd.concat(df_vec, axis=0)
    # Write it to clean data
    df.to_csv(os.path.join(config['data']['clnFilePath'], 'ts_data.csv'))

    Master function which takes all raw series, cleans them,
    and outputs to a flat file
    
Master function which takes all raw series, cleans them,
and outputs to a flat file
Master function which takes all raw series cleans them and outputs to a flat file
def create_clean_data():
    config = utils.read_config()
    df_vec = []
    for key in list(config['timeSeries'].keys()):
        df_vec.append(clean_ons_time_series(key, *config['timeSeries'][key]))
    df = pd.concat(df_vec, axis=0)
    df.to_csv(os.path.join(config['data']['clnFilePath'], 'ts_data.csv'))
def create_clean_data ( ) : config = utils . read_config ( ) df_vec = [ ] for key in list ( config [ 'timeSeries' ] . keys ( ) ) : df_vec . append ( clean_ons_time_series ( key , * config [ 'timeSeries' ] [ key ] ) ) df = pd . concat ( df_vec , axis = 0 ) df . to_csv ( os . path . join ( config [ 'data' ] [ 'clnFilePath' ] , 'ts_data.csv' ) )
Master function which takes all raw series, cleans them,
and outputs to a flat file
Master function which takes all raw series cleans them and outputs to a flat file
"""
    Master function which takes all raw series, cleans them,
    and outputs to a flat file
    """ # Get config file # Create empty list for vector of dataframes # Put this into tidy format # Write it to clean data