I have the question: Round the profit and sales columns to two floating points. Superstore is a dataset I have imported as a pandas dataframe. The code I have written is:
superstore = superstore[superstore['Sales'] != ' 16GB']
#part 4
superstore['Profit'] = superstore['Profit'].round(2)
superstore['Sales'].apply(lambda x: float(x))
#sales = float(superstore['Sales'])
numeric_filter = filter(str.isdigit, superstore['Sales'])
#sales = float(raw_input('Sales'))
superstore['Sales'] = superstore['Sales'].round(2)
I keep getting the error, "TypeError: can't multiply sequence by non-int of type 'float'" and I am unsure of how to fix this. The error is on the line, "superstore['Sales'] = superstore['Sales'].round(2)".