mercredi 25 décembre 2019

how to change a column with both negative and positive value into two columns with negative value plus zero and positive value plus zero

My data is the following:

t  B
1  2
2 -3
3 -7  

How could i have the output like below? It means that when the data from column B is negative, the column N will equal this columnB's data,or it will equal to zero. On the contrary, when the data from column B is positive, the column P will equal this data, or it will equal to zero.

t   B  N  P
1   2  0  2
2  -3 -3  0
3  -7 -7  0

Aucun commentaire:

Enregistrer un commentaire