Frequency Distribution Function In Python