+ 1
I don't seem to understand Bob the builder exercise
I tried building my data frame to use to predict but I have an issue input the features data into the dataframe https://code.sololearn.com/cH39ZwqeOngc/?ref=app
2 ответов
+ 2
Hi! It’s a little difficult to understand what you are trying to do. For what I understood, there is an error in your input.
When you ask user for an input, the input() function return a string.
So, if you need to pass some integer/float value to the df, you have to cast them in the correct type.
1) split the string
2) cast each terms in the correct type
Moreover, I am not sure if you need pandas at all. I think you can cast the X and Y list into two numpy array without creating a df.
Cheers!
0
Thank you.. what I am trying to do is get the input data into a dataframe. So that I can extract the features and target. But I really got confused about the whole thing so I am trying to look up how to convert the input data into dataframe