<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def build_routes(pfeed):
 """ Given a ProtoFeed, return a DataFrame representing ``routes.txt``. """

    f = pfeed.frequencies[['route_short_name', 'route_long_name',
      'route_type', 'shape_id']].drop_duplicates().copy()

    # Create route IDs
    f['route_id'] = 'r' + f['route_short_name'].map(str)

    del f['shape_id']

    return f