To select multiple columns from a DataFrame in Python, you can use a list of column names within the selection brackets []. Here's an example using a DataFrame named titanic:
# Select the 'Age' and 'Sex' columns
age_sex = titanic[["Age", "Sex"]]
# Display the first 5 rows
print(age_sex.head())
This will give you a new DataFrame containing only the specified columns.
