Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def data(self):
data = ghcn_daily.get_data(self.catalog_entry,
elements=self.parameter_code,
as_dataframe=True) # [parameter_code]
if not data or data[self.parameter_code].empty:
raise ValueError('No Data Available')
data = data[self.parameter_code]
data = data[self.start_string:self.end_string]
if data.empty:
raise ValueError('No Data Available')
data.rename(columns={'value': self.parameter}, inplace=True)
return data