ESIOS
ESIOS copied to clipboard
Manage empty data
Address the output of:
get_multiple_series(self, indicators, start, end):
In case of "df_new = None" display a warning message. Otherwise this will have an impact later on, such as the following TypeError:
File "C:\Users\lopsanru\PycharmProjects\utilRLS\PyTools\ESIOS\conexion_pyesios.py", line 49, in <module>
grafico(token, indicators_, start_, end_)
File "C:\Users\lopsanru\PycharmProjects\utilRLS\PyTools\ESIOS\conexion_pyesios.py", line 13, in grafico
df = df_merged[names] # get the actual series and neglect the rest of the info
TypeError: 'NoneType' object is not subscriptable
Hi,
I believe that in this case, there should be an if statement like so:
dfmul, df_list, names = esios.get_multiple_series(indicators_, start_, end_)
if dfmul is not None:
df = dfmul[names]