Create a new DataFrame with the specified sorting order.
This does not modify the current DataFrame, instead it returns a new DataFrame.
The sorting will remain in the returned DataFrame as long as no operations are performed on that
frame that materially change the selected data. Operations that materially change the selected data
are for example
materialize(), and filtering out rows.
Adding or removing a column does not materially change the selected data.
by(Union[str, List[str]]) – column label or list of labels to sort by.
ascending(Union[bool, List[bool]]) – Whether to sort ascending (True) or descending (False). If this is a list, then the
bymust also be a list and
len(ascending) == len(by).
a new DataFrame with the specified ordering.