Spaces:
Sleeping
Sleeping
Update pages/market_rent_estimation.py
Browse files
pages/market_rent_estimation.py
CHANGED
|
@@ -105,8 +105,7 @@ def main():
|
|
| 105 |
filtered_data = df_data[["google_ola", "market_costar", "submarket_costar", "execution_date", "rented_sf", "building_sf", "year_built", "office_rate", "min_clear_height", "max_clear_height", "docks", "drive_ins", "rent_combined"]]#pd.concat([filtered_data2])
|
| 106 |
filtered_data.insert(loc=1, column='Similarity score', value=comps_scores)
|
| 107 |
|
| 108 |
-
# Formatting the DataFrame
|
| 109 |
-
# filtered_data['Address'] = filtered_data['Address']
|
| 110 |
filtered_data['Similarity score'] = (1 - filtered_data['Similarity score']) * 100
|
| 111 |
filtered_data['execution_date'] = pd.to_datetime(filtered_data['execution_date']).dt.strftime('%m-%d-%Y')
|
| 112 |
filtered_data['LSF (sf)'] = filtered_data['rented_sf'].round(0).astype(int)
|
|
@@ -117,8 +116,8 @@ def main():
|
|
| 117 |
filtered_data.loc[filtered_data['min_clear_height'].notna(), 'min_clear_height'] = (filtered_data.loc[filtered_data['min_clear_height'].notna(), 'min_clear_height']).round(0).astype(int)
|
| 118 |
# filtered_data['Clear Height (feet)'] = filtered_data['min_clear_height'].round(0).astype(int)
|
| 119 |
|
| 120 |
-
filtered_data.loc[filtered_data['docks'].notna(), 'docks'] = (filtered_data.loc[filtered_data['docks'].notna(), 'docks']).astype(int)
|
| 121 |
-
filtered_data.loc[filtered_data['drive_ins'].notna(), 'drive_ins'] = (filtered_data.loc[filtered_data['drive_ins'].notna(), 'drive_ins']).astype(int)
|
| 122 |
|
| 123 |
# filtered_data['Docks (/10ksf)'] = filtered_data['docks'].astype(int)
|
| 124 |
# filtered_data['Doors (/10ksf)'] = filtered_data['drive_ins'].astype(int)
|
|
@@ -128,10 +127,12 @@ def main():
|
|
| 128 |
filtered_data = filtered_data.drop(columns=['rented_sf', 'building_sf', 'year_built', 'max_clear_height', 'rent_combined'])
|
| 129 |
filtered_data = filtered_data.rename(columns={
|
| 130 |
'google_ola': 'Address',
|
| 131 |
-
'
|
| 132 |
-
'Clear Height (feet)'
|
| 133 |
-
'Docks (/10ksf)'
|
| 134 |
-
'Doors (/10ksf)'
|
|
|
|
|
|
|
| 135 |
})
|
| 136 |
|
| 137 |
|
|
|
|
| 105 |
filtered_data = df_data[["google_ola", "market_costar", "submarket_costar", "execution_date", "rented_sf", "building_sf", "year_built", "office_rate", "min_clear_height", "max_clear_height", "docks", "drive_ins", "rent_combined"]]#pd.concat([filtered_data2])
|
| 106 |
filtered_data.insert(loc=1, column='Similarity score', value=comps_scores)
|
| 107 |
|
| 108 |
+
# Formatting the DataFrame
|
|
|
|
| 109 |
filtered_data['Similarity score'] = (1 - filtered_data['Similarity score']) * 100
|
| 110 |
filtered_data['execution_date'] = pd.to_datetime(filtered_data['execution_date']).dt.strftime('%m-%d-%Y')
|
| 111 |
filtered_data['LSF (sf)'] = filtered_data['rented_sf'].round(0).astype(int)
|
|
|
|
| 116 |
filtered_data.loc[filtered_data['min_clear_height'].notna(), 'min_clear_height'] = (filtered_data.loc[filtered_data['min_clear_height'].notna(), 'min_clear_height']).round(0).astype(int)
|
| 117 |
# filtered_data['Clear Height (feet)'] = filtered_data['min_clear_height'].round(0).astype(int)
|
| 118 |
|
| 119 |
+
filtered_data.loc[filtered_data['docks'].notna(), 'docks'] = (filtered_data.loc[filtered_data['docks'].notna(), 'docks']).round(0).astype(int)
|
| 120 |
+
filtered_data.loc[filtered_data['drive_ins'].notna(), 'drive_ins'] = (filtered_data.loc[filtered_data['drive_ins'].notna(), 'drive_ins']).round(0).astype(int)
|
| 121 |
|
| 122 |
# filtered_data['Docks (/10ksf)'] = filtered_data['docks'].astype(int)
|
| 123 |
# filtered_data['Doors (/10ksf)'] = filtered_data['drive_ins'].astype(int)
|
|
|
|
| 127 |
filtered_data = filtered_data.drop(columns=['rented_sf', 'building_sf', 'year_built', 'max_clear_height', 'rent_combined'])
|
| 128 |
filtered_data = filtered_data.rename(columns={
|
| 129 |
'google_ola': 'Address',
|
| 130 |
+
'office_rate': 'Office %',
|
| 131 |
+
'min_clear_height': 'Clear Height (feet)',
|
| 132 |
+
'docks': 'Docks (/10ksf)',
|
| 133 |
+
'drive_ins': 'Doors (/10ksf)',
|
| 134 |
+
'market_costar': 'Market',
|
| 135 |
+
'submarket_costar': 'Submarket'
|
| 136 |
})
|
| 137 |
|
| 138 |
|