<human>:  Write me a Python function to sort data within a column.
<bot>:})

# Calling the function
df = sort_data(df, 'col1')

# Printing the dataframe
print(df)

#Example Output

#  col1 col2
# 0   1  a
# 1   2  b
# 2   3  c
# 3   4  d
# 4   5  e

#Remember to inspect code for bugs.