How to add a string column with different valors at each row

Hi,

I am working on a project of calculation of carbon emissions. I have a csv with informations about each truck route. I have a column named “Type_carburant” wich indicates the type of fuel that is used. I need to create a new column that gives a coefficient for each row in function of the type of fuel.

For exemple, if Type_carburant == gazole B30, coefficient = 2,64. I have a database with coefficents in function of the fuel.

The new column i want here in red :

Capture coef

What nodes do i need to use to assign a “coefficient” for each row in a new column ?

Thanks for your help !

Without knowing how your data is configured its difficult to offer help. Do you have two separate tables, one with the route information and the other with coefficients? If so, you can join based on the fuel type assuming its in both tables.

1 Like