Apr-24-2017, 08:10 PM
(Apr-24-2017, 07:59 PM)zivoni Wrote:(Apr-24-2017, 07:16 PM)smw10c Wrote: When I try df3['initial cost'][df3['initial cost'] < 0] = NaN, the error I get is: TypeError: '<' not supported between instances of 'str' and 'int'Did you convertdf3['initial cost']
to numeric dtype, as was mentioned before? Do not worry about not posting quote/response aligned, it takes some time to learn editor (but using Preview Post button helps a lot)
Thank you! That was the issue. I forgot to convert it to numeric type. Thanks again for bearing with me.