I have a columns which include stay_in_current_city_years. And there are some data like 4+
And i want to some algorithms. Firstly linear regression
from sklearn.linear_model import LinearRegression
r=LinearRegression()
r.fit(x_train,y_train)
y_pred=r.predict(x_test)
print(y_pred)
ValueError: could not convert string to float: '4+'
If you are trying to remove the + then the easiest to understand way to remove it would be: