Spaces:
Runtime error
Runtime error
Commit ·
d9bfd48
1
Parent(s): eb3c5e9
Update preprocess_function.py
Browse files- preprocess_function.py +4 -4
preprocess_function.py
CHANGED
|
@@ -23,10 +23,10 @@ stop_words = stop_words.union(stop_words_2)
|
|
| 23 |
|
| 24 |
list_location = []
|
| 25 |
for col in ['name','capital','region','subregion']:#countries
|
| 26 |
-
list_location.extend(list(set(pd.read_csv('
|
| 27 |
-
list_location.extend(list(set(pd.read_csv('
|
| 28 |
-
list_location.extend(list(set(pd.read_csv('
|
| 29 |
-
list_location.extend(list(set(pd.read_csv('
|
| 30 |
|
| 31 |
locations_removal = set([x.lower() for x in list_location if not pd.isna(x)])
|
| 32 |
|
|
|
|
| 23 |
|
| 24 |
list_location = []
|
| 25 |
for col in ['name','capital','region','subregion']:#countries
|
| 26 |
+
list_location.extend(list(set(pd.read_csv('countries.csv')[col])))
|
| 27 |
+
list_location.extend(list(set(pd.read_csv('states.csv')['name'])))
|
| 28 |
+
list_location.extend(list(set(pd.read_csv('cities.csv')['name'])))
|
| 29 |
+
list_location.extend(list(set(pd.read_csv('zones.csv')['Zone'])))
|
| 30 |
|
| 31 |
locations_removal = set([x.lower() for x in list_location if not pd.isna(x)])
|
| 32 |
|