Nixtla/hierarchicalforecast

Typeerror: expected str instance,float found. With Null values in the Y_df dataframe.

NamrataRade opened this issue · 2 comments

Error while running aggregate module
spec = [['Country'],
['Country','area_id'],
['Country','area_id', 'lvl1'],
['Country','area_id', 'lvl1', 'lvl2'],
['Country','area_id', 'lvl1', 'lvl2','lvl3'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4','lvl5'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4','lvl5','lvl6'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4','lvl5','lvl6','lvl7'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4','lvl5','lvl6','lvl7','lvl8'],
['Country','area_id', 'lvl1', 'lvl2','lvl3','lvl4','lvl5','lvl6','lvl7','lvl8','lvl9']]

Y_df, S_df, tags = aggregate(copy_df_area, spec)

Y_df = Y_df.reset_index()

Hi @NamrataRade,

Thanks for using the HierarchicalForecast library.

  • Would you be able to provide more details on the error?
  • What are your dataframes dtypes?

Hi @kdgutier ,
Thanks for the reply
There were nulls in the data. Issue got resolved after handling those.