def holdout(df, p):
	"""
	Splits a dataframe of examples into training and testing data.
	
	Parameter:
	df -- a dataframe of examples
	p -- proportion of training vs testing (0.00..1.00]
	
	Return:
	train -- training examples
	test -- testing examples
	"""
	if 0.00 < p < 1.00:
		d = df.copy()
		train = d.sample(frac=p) # split, and randomize
		test = d.drop(train.index) # remove train data from df
		if len(test) == 0:
			print("Proportion of training examples is too high.\n")
			exit(1)
		return train, test
	else:
		print("\nThe proportion of training examples must be (0.00..1.00).\n")
		exit(1)