<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Create Date Data
Step2:  Lag Time Data By One Row
<ASSISTANT_TASK:>
Python Code:
# Load library
import pandas as pd
Explanation: Title: Lag A Time Feature
Slug: lag_a_time_feature
Summary: How to lag a dates and times feature for machine learning in Python.   
Date: 2017-09-11 12:00
Category: Machine Learning
Tags: Preprocessing Dates And Times  
Authors: Chris Albon
Preliminaries
End of explanation
# Create data frame
df = pd.DataFrame()
# Create data
df['dates'] = pd.date_range('1/1/2001', periods=5, freq='D')
df['stock_price'] = [1.1,2.2,3.3,4.4,5.5]
Explanation: Create Date Data
End of explanation
# Lagged values by one row
df['previous_days_stock_price'] = df['stock_price'].shift(1)
# Show data frame
df
Explanation: Lag Time Data By One Row
End of explanation
<END_TASK>