So I am currently making a neural network MLP (Multi-layer-Perceptron) on group classification on sea turtle speed between beach to sea on the seconds unit, and it looks somewhat like this.
Now on my Jupyter Notebook I type the following
data = pd.read_csv("SeaTurtles.csv")
data
It shows the data in dataframe
What I wanted to do is to separate these two groups which are group A for "Training" data and group B for "Testing" data. I wanted to convert the dataframe into a NumPy array so that it would make it easier for me to classify them into the SpeciesCode. So I type in:
newdf=data.drop(['Group1','Group 2'], axis = 1)
newdf
I need to split it into two test group A and B so I typed in
groupA=newdf.loc[newdf['Test*'] == 'A']
groupB=newdf.loc[newdf['Test*'] == 'B']
What I did was to convert these into numpy array with .to_numpy()
groupA = groupA.to_numpy()
groupA
and it returns the "AttributeError: 'numpy.ndarray' object has no attribute 'to_numpy'
"

My question is did I do something wrong or is there another way for me to convert this dataframe into numpy array so that I can start training the data? Thank you in advance.




