I have a dataframe, columns to be used are "sepal_length" and "sepal_width". I want to turn each single row into a single data point, like point1= [5.1 3.5] and point2 = [4.9 3] and so on. .to_numpy() just turns the whole 2 columns into large-sized numpy array, so it does not work for me. How can I work out?
-
does this solve your problem stackoverflow.com/questions/13187778/…Joe Ferndz– Joe Ferndz2020-10-30 06:35:06 +00:00Commented Oct 30, 2020 at 6:35
-
Does this answer your question? Mapping rows of a Pandas dataframe to numpy arrayRuli– Ruli2020-10-30 06:37:27 +00:00Commented Oct 30, 2020 at 6:37
Add a comment
|
