I am trying to turn any floating point number in the list 'codes' to an int.
codes = [890.0,'JFR'] codes = [int(c) for c in codes]
I am getting the error:
ValueError: invalid literal for int() with base 10: 'JFR'
What I want the list 'codes' to be is:
My question is how do I change only the floating point numbers to an int without getting the error?