Commit eeccbae2 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polish modules dataframes and model_report.

parent 153b603f
......@@ -1068,7 +1068,7 @@ def get_people_per_year(**kwargs):
#
# Clean and keep memory footprint low
#
df = (df.drop("period", axis="columns")
df = (df.drop(["period", "year_start", "year_end"], axis="columns")
.assign(
agency=lambda x: pd.Categorical(x.agency),
......@@ -1329,7 +1329,8 @@ def to_extjs_gridcolumns(df):
cfg.xtype = "numbercolumn"
elif coltype in (np.float16, np.float32, np.float64):
cfg.format = "0.00"
cfg.formatter = "round(2)"
cfg.summaryFormatter = "round(2)"
cfg.summaryType = "sum"
cfg.xtype = "numbercolumn"
......
......@@ -208,8 +208,11 @@ class Report(object):
Field("sorters", "list:string", comment=TP_SORTERS),
# NOTE
# - notnull when creating the database
# - null later on in order to run callback ON_CREATE_LISTS, ...
Field("columns", "text",
default="",
notnull=migrate,
comment=T(TP_COLUMNS)),
Field("features",
......
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