I first became a Python Developer

I enrolled college as a physics major

I started college at the age of 17 at Stevens Institute of Technology in Hoboken, NJ. I graduated high school in three years and had not gotten a chance to take Calc 1 or any AP courses. I enrolled as a physics major, hoping to minor in philosophy and ultimately pursue a career in theoretical physics. …

Python lists are data structures used to store and change items. If you’re just learning Python or want to learn some neat tricks when using lists, this post is for you! The documentation on python lists can be found here.

1. Element-wise addition of two lists

Today I tackled plotting both probability density functions and kernel density estimations in Python.

In order to first understand probability density functions or PDF’s, we need to first look at the docs for scipy.stats.norm.


A normal continuous random variable.

The location (loc) keyword specifies the mean. The scale (scale) keyword specifies the standard deviation.

Given a dataframe and a column in that dataframe, we can calculate the probability density function of a variable using the following:

from scipy import statsdata = df['column']
loc = data.mean()
scale = data.std()
pdf = stats.norm.pdf(data, loc=loc, scale=scale)

We can also use stats.norm to…

Kasey Mallette

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store