np.random.rand(3) meaning code example
Example: np.random.rand()
# train test split
df = pd.read_csv('file_location')
mask = np.random.rand(len(df)) < 0.8
train = df[mask]
test = df[~mask]
# train test split
df = pd.read_csv('file_location')
mask = np.random.rand(len(df)) < 0.8
train = df[mask]
test = df[~mask]