Regression algorithms working fine on represented as numbers. It's quite clear how to do regression on data which contains numbers and predict output. However I need to do regression analysis on data that contains categorical feature. I have a csv file which contains two columns install-id and page-name both are object type. I need to give install-id as input and page-name should be predicted as output. Below is my code. Please help me in this.

```
import pandas as pd
data = pd.read_csv("/Users/kashifjilani/Downloads/csv/newjsoncontent.csv")
X = data["install-id"]
Y = data["endPoint"]
X = pd.get_dummies(data=X, drop_first=True)
from sklearn import linear_model
from sklearn.model_selection import train_test_split
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = .20, random_state = 40)
regr = linear_model.LinearRegression()
regr.fit(X_train, Y_train)
predicted = regr.predict(X_test)

```