def filtered_table(): payload = request.json print(payload) filters = process.filter_builder(payload["filters"]) print(filters) data = process.table_builder(payload["table"], filters) if data.empty == False: info_tabla = data.to_dict() else: info_tabla = "no info" obj = {'status': 'OK', 'data': {'table': info_tabla}} return jsonify(obj)
def retrieve_departamentos(): municipios = process.table_builder("departments") return {'status': 'OK', 'data': municipios.to_dict()}
def retrieve_factors(table): factors = process.table_builder(table) return {'status': 'OK', 'data': {'topics': factors.to_dict()}}
def retrieve_municipios(): municipios = process.table_builder("municipalities") return {'status': 'OK', 'data': municipios.to_dict()}