Skip to content

Instantly share code, notes, and snippets.

View nhntran's full-sized avatar

Tran Nguyen, Ph.D. nhntran

View GitHub Profile
import pandas as pd
#### Read the data
melb = pd.read_csv('melb_data.csv')
### Task 1: Find the address, price, and date of the houses in Albion.
# Then, sort the results by price in ascending order and by date in descending order.
melb[['Suburb', 'Address', 'Price', 'Date']].query('Suburb == "Albion"').sort_values(by = ['Price', 'Date'], ascending = [True, False])
## Task 2: Change the name of the following columns as indicated: