My pandas data frame is as below. IN the "price" column, I want to convert non digit values to nan. Thanks.
Input:
ID, name, qty, price
1, pen, 4, 55
2, book, 5, ai
3, PENCIL, 5, 100
4, book2, 10, si
output:
ID, name, qty, price
1, pen, 4, 55
2, book, 5, nan
3, PENCIL, 5, 100
4, book2, 10, nan