<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:  Make a dataframe
Step2:  Add a new column for elderly
<ASSISTANT_TASK:>
Python Code:
# Import required modules
import pandas as pd
import numpy as np
Explanation: Title: Create a Column Based on a Conditional in pandas
Slug: pandas_create_column_using_conditional
Summary: Create a Column Based on a Conditional in pandas
Date: 2016-05-01 12:00
Category: Python
Tags: Data Wrangling
Authors: Chris Albon  
Preliminaries
End of explanation
data = {'name': ['Jason', 'Molly', 'Tina', 'Jake', 'Amy'], 
        'age': [42, 52, 36, 24, 73], 
        'preTestScore': [4, 24, 31, 2, 3],
        'postTestScore': [25, 94, 57, 62, 70]}
df = pd.DataFrame(data, columns = ['name', 'age', 'preTestScore', 'postTestScore'])
df
Explanation: Make a dataframe
End of explanation
# Create a new column called df.elderly where the value is yes
# if df.age is greater than 50 and no if not
df['elderly'] = np.where(df['age']>=50, 'yes', 'no')
# View the dataframe
df
Explanation: Add a new column for elderly
End of explanation
<END_TASK>