Skip to content

Commit 0e4f213

Browse files
committed
revoke commit 38dcb54
1 parent 38dcb54 commit 0e4f213

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

climada/entity/exposures/base.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -381,32 +381,6 @@ def read_mat(self, file_name, var_names=DEF_VAR_MAT):
381381
Exposures.__init__(self, data=exposures)
382382
_read_mat_metadata(self, data, file_name, var_names)
383383

384-
def read_csv(self, file_name):
385-
"""Read MATLAB file and store variables in exposures.
386-
387-
Parameters:
388-
file_name (str): absolute path file
389-
Note:
390-
The input CSV-file needs to consist of at least these columns:
391-
- value
392-
- latitude
393-
- longitude
394-
"""
395-
# load CSV to pandas data frame:
396-
data = pd.read_csv(file_name)
397-
# check for missing variables:
398-
if not ('value' and 'latitude' and 'longitude') in data.columns:
399-
raise ValueError('Required column(s) missing: value, latitude, or longitude.')
400-
if 'Unnamed: 0' in data.columns:
401-
data.index = data['Unnamed: 0']
402-
data = data.drop(columns='Unnamed: 0')
403-
if not 'if_TC' in data.columns:
404-
data['if_TC'] = np.ones(data.shape[0], int)
405-
# Init Exposures from data frame:
406-
Exposures.__init__(self, data=data)
407-
self.tag = Tag(file_name)
408-
self.check()
409-
410384
#
411385
# Implement geopandas methods
412386
#

0 commit comments

Comments
 (0)