-1

I'm forecasting multiple times series using Prophet of Facebook and the results of the forecast are on a listbut I would like to get them on a dataframe. Can you help me? Thanks

Results of forecast

1 Answers1

0

I'd suggest using python's .split() method in some loop to separate the values in each list element. The split method takes a delimiter which would be white space, " " in your case. After this you'll have a 2D list https://www.w3schools.com/python/ref_string_split.asp

Then I'd consider importing pandas and convert from 2D list to dataframe using .DataFrame() https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html

example: https://datascience.stackexchange.com/questions/26333/convert-a-list-of-lists-into-a-pandas-dataframe

Rory LM
  • 160
  • 2
  • 15