subtracting two columns from pandas dataframe and store the result in third column [closed]
问题 Closed. This question needs debugging details. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Improve this question I have a DataFrame, df , with 3 columns and I want to perform subtraction as follows: df['available'] = df['recommended'] - df['manual input'] But I am getting an error stating: unsupported operand type(s) for -: 'int' and 'str' I have also tried doing df['available'] = df[