I am geting an error here

input_cols=[“Pclass”,“Sex”,“Age”,“SibSp”,“Parch”,“Fare”]
output_cols=[“Survived”]

X=data_clean[input_cols]
Y=data_clean[output_cols]

the error is
TypeError Traceback (most recent call last)
in
2 output_cols=[“Survived”]
3
----> 4 X=data_clean[input_cols]
5 Y=data_clean[output_cols]

TypeError: list indices must be integers or slices, not list

Hey @sankalparora5, make sure your data_clean is of type dataframe.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.