+ 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

4th May 2023, 11:26 AM
Gemuh Hans
2 odpowiedzi
+ 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!
4th May 2023, 2:17 PM
Damiano Meloni
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
4th May 2023, 2:31 PM
Gemuh Hans