vendredi 26 juin 2020

How can i split a column based on a condition in Python pandas

My one of the columns consist following data -

Numbers
100 K
25.20 K
250 K
33.45 K
250
100
10
5
4
1

In the above Numbers column, I want to multiply numbers with K with 1000's and the other numbers without K, i want to leave them as it is. How can I perform this conditional splitting and multiplication of column Numbers

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire