@transformer<EOL>def rename_fields(input, **params):
PARAM_RENAME_LIST = '<STR_LIT>'<EOL>RENAME_SRC_FIELD = '<STR_LIT>'<EOL>RENAME_DEST_FIELD = '<STR_LIT>'<EOL>rename_list = params.get(PARAM_RENAME_LIST)<EOL>for row in input:<EOL><INDENT>for rename in rename_list:<EOL><INDENT>row[rename[RENAME_DEST_FIELD]] = row[rename[RENAME_SRC_FIELD]]<EOL>row.pop(rename[RENAME_SRC_FIELD])<EOL><DEDENT><DEDENT>return input<EOL>
Renames field in collection
:param input:
:param params:
:return: