We can sort our data frame by a particular column using the order() function. Sort my_df by the quantity columns.
order()
my_df
quantity
See that? The order() functions allows us to sort vectors. By default, it sorts in ascending order.