Spaces:
Sleeping
Sleeping
Commit ·
d4ff3d2
1
Parent(s): 47a8e15
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,9 +53,9 @@ def google_address(address):
|
|
| 53 |
df['Link']=[i[7:i.find('&sa=')] for i in df['Link']]
|
| 54 |
df['Website'] = df['Link'].apply(extract_website_domain)
|
| 55 |
|
| 56 |
-
df['Square Footage']=df['Description'].str.extract(r"((\d+) Square Feet|(\d+) sq. ft.|(\d+) sqft|(\d+) Sq. Ft.|(\d+) sq|(\d+(?:,\d+)?) Sq\. Ft\.)")[0]
|
| 57 |
-
df['Square Footage']=df['Square Footage'].str.
|
| 58 |
-
|
| 59 |
df['Beds']=df['Description'].replace({'-':' ','total':''},regex=True).str.extract(r"(\d+) bed")
|
| 60 |
|
| 61 |
df['Baths']=df['Description'].replace({'-':' ','total':''},regex=True).str.extract(r"((\d+) bath|(\d+(?:\.\d+)?) bath)")[0]
|
|
|
|
| 53 |
df['Link']=[i[7:i.find('&sa=')] for i in df['Link']]
|
| 54 |
df['Website'] = df['Link'].apply(extract_website_domain)
|
| 55 |
|
| 56 |
+
df['Square Footage']=df['Description'].str.extract(r"((\d+) Square Feet|(\d+) sq. ft.|(\d+) sqft|(\d+) Sq. Ft.|(\d+) sq|(\d+(?:,\d+)?) Sq\. Ft\.|(\d+(?:,\d+)?) sq)")[0]
|
| 57 |
+
df['Square Footage']=df['Square Footage'].replace({',':''},regex=True).str.replace(r'\D', '')
|
| 58 |
+
|
| 59 |
df['Beds']=df['Description'].replace({'-':' ','total':''},regex=True).str.extract(r"(\d+) bed")
|
| 60 |
|
| 61 |
df['Baths']=df['Description'].replace({'-':' ','total':''},regex=True).str.extract(r"((\d+) bath|(\d+(?:\.\d+)?) bath)")[0]
|