0
Hello, I’m starting in supervised learning and want to separate one sample random of my dataframe for testing leaving the rest for training.
I got the result I was hoping for, but I’m uncertain if this is more of a gambit.
So if someone more experienced can take a look and show me a more reliable way, I would be grateful.
That’s what my code looks like
import pandas as pd
uri = 'https://gist.githubusercontent.com/guilhermesilveira/2d2efa37d66b6c84a722ea627a897ced/raw/10968b997d885cbded1c92938c7a9912ba41c615/tracking.csv'
dados = pd.read_csv(uri)
teste = dados.sample(24)
treino = dados[~dados.isin(teste)].dropna()
Exactly what I was looking for. Thank you very much!
– Faiçal Baracat