palantir foundry - Función de Typescript: Palantirfoundry - eliminar un valor en un dataframe
Me gustaría obtener ayuda con una función de TypeScript sobre un objeto de ontología. Me gustaría escribir un programa en TypeScript que tome un dataframe como entrada. Cuando elimino un valor de una fila en una columna, los valores en otras columnas cambian a nulo.
Por ejemplo, este es un dataframe
| ID | nivel | responsable | descripción |
|---|---|---|---|
| A12 | nivel2 | NG34Jean | Hoja |
| B15 | nivel5 | NG90Elis | Aullar |
| C67 | nivel4 | NG64Matire | Abrazadera |
| H65 | nivel3 | NG45Louis | Cúbico |
| J90 | nivel0 | NG08Marie | ¡Puaj! |
For the ID = B15, I would like to remove its level ie "level5" hence the values of "responsible" and "description" egal to "Null"
For the ID = H65, I would like to remove its level ie "level3" hence the values of "responsible" and "description" egal to "Null"
Aquí está el dataframe al final
| ID | nivel | responsable | descripción |
|---|---|---|---|
| A12 | nivel2 | NG34Jean | Hoja |
| B15 | Sin valor | nulo | nulo |
| C67 | nivel4 | NG64Matire | Abrazadera |
| H65 | Sin valor | nulo | nulo |
| J90 | nivel0 | NG08Marie | ¡Puaj! |
@OntologyEditFunction()
public async deletevaluetable(
objectpart: ObjectPartsNew[],
ID?: string,
level?: string,
responsible?: string,
description?: string,
): Promise<void> {
function deletevaluetable() {
var manual;
for (var i = 0; i < objectpart.length; i++) {
manual=objectpart[i];
var updates = 0;
const properties_dict: manualUpdate = {
"manual": ID,
};
.....
}
}
}