Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
phyeony committed Dec 8, 2022
1 parent 714c884 commit 4f83a42
Show file tree
Hide file tree
Showing 2 changed files with 5,575 additions and 5,575 deletions.
4 changes: 2 additions & 2 deletions data-analysis/airbnb/airbnb_cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def d_to_price(d_price):
# Data cleaning - only using the data we need
airbnb = airbnb[['name', 'listing_url','neighbourhood', 'latitude', 'longitude', 'price', 'room_type', 'review_scores_rating']]
airbnb['price'] = airbnb['price'].apply(lambda x: d_to_price(x))
airbnb = airbnb.sort_values(by=['price']) #min = 0, max = 20000
#airbnb = airbnb.sort_values(by=['price']) #min = 0, max = 20000

# Export to a cleaned csv file
airbnb.to_csv("cleaned_airbnb_data.csv", index=False)
airbnb.to_csv("cleaned_data/cleaned_airbnb_data.csv", index=False)

# %%
Loading

0 comments on commit 4f83a42

Please sign in to comment.