Commit fd250488 authored by Isaac AFAMBO's avatar Isaac AFAMBO
Browse files

modification pour la procédure validate

parent 22efffa1
......@@ -212,16 +212,14 @@ def write_series_jsonl(series_filepath: Path, df, dimension_list):
# columns observations
period_list = df_transpose.columns[:-2].tolist()
value_list = df_transpose.loc[ts_code][:-2].fillna('NA').tolist()
obs_list = [('date', 'value')] + list(zip(period_list, value_list))
obs_list = [('PERIOD', 'VALUE')] + list(zip(period_list, value_list))
ts_data = { # creation d'un dictionnaire tel que l'on ait le code de City Names et son label et une serie de données
'code': df_transpose.loc[ts_code]['city_code'],
'dimension': df_transpose.loc[ts_code]['city_code'],
'dimensions': {'city_name':df_transpose.loc[ts_code]['city_code']},
'observations': obs_list, # cette série de données comprend une liste avec la date et la valeur vouluee
}
json_str = json.dumps(ts_data, ensure_ascii=False, sort_keys=True)
fd.write(json_str + '\n')
if __name__ == '__main__':
sys.exit(main())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment