def qualitative_dates(df,
	iterator_column='Animal_id',
	date_column='relative_date',
	label='qualitative_date',
	fuzzy_matching={},
	):
	"""
	Assign qualitative date labels.

	Parameters
	----------

	df : pandas.DataFrame
		A `pandas.DataFrame` object containing a date column.
	iteraor_column : string, optional
		The label of the column which identifies the base entities of which each should be assigned a set of qualitatie dates (most commonly this is `Animal_id`, or `Cage_id`).
	date_column : string, optional
		The label of the column which serves as the quantitative record which is to be discretized into qualitative dates.
	label : string, optional
		The label to assign to the new qualitative date column.
	fuzzy_assignment : dict, optional
		A dictionary the keys of which are qualitative date labels to be assigned, and the values of which are lists giving the quantitative date labels in the order of preference based on which to assign the labels.
	"""

	df[label]=''
	for i in df[iterator_column]:
		try:
			for label, dates in fuzzy_matching.iteritems():
				for date in dates:
					if date in df[df[iterator_column]==i][date_column].values:
						df.loc[(df[iterator_column]==i)&(df[date_column]==date),'qualitative_date']=label
						break
		except AttributeError:
			for label, dates in fuzzy_matching.items():
				for date in dates:
					if date in df[df[iterator_column]==i][date_column].values:
						df.loc[(df[iterator_column]==i)&(df[date_column]==date),'qualitative_date']=label
						break
	return df