Use pandas to lag your timeseries data in order to examine causal relationships

Frequently in social sciences, it is difficult to see cause and effect relationships in our data. Here I explore the pandas.shift() function in Python to help us establish temporal precedence in our data in order to derive insights.

Applications where lagging our data is useful include (but are not limited to) analyzing how a change in policy affects patient wellness, and seeing how a new social media strategy implementation influences engagement.