Complete the code to sort the DataFrame df by the column 'age' in ascending order.
sorted_df = df.sort_values(by='age', ascending=[1])
Setting ascending=True sorts the DataFrame in ascending order by the specified column.
Complete the code to sort the DataFrame df by the column 'score' in descending order.
sorted_df = df.sort_values(by='score', ascending=[1])
Setting ascending=False sorts the DataFrame in descending order.
Fix the error in the code to sort df by 'height' in descending order.
sorted_df = df.sort_values(by='height', ascending=[1])
The ascending parameter must be a boolean, not a string or None.
Fill both blanks to sort df by 'age' ascending and then by 'score' descending.
sorted_df = df.sort_values(by=[[1], [2]], ascending=[True, False])
We sort first by 'age' ascending, then by 'score' descending.
Fill all three blanks to create a dictionary with word lengths for words longer than 3 characters.
lengths = { [1] : len([2]) for [3] in words if len([2]) > 3 }The dictionary comprehension uses 'word' as the variable name for each item in words.