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
Asked
Active
Viewed 46 times
-1
-
Consider adding some images of what you have now, also add some portion of the code or an idea of what you are attemping to do – Diego Bascans Nov 26 '19 at 02:53
-
pd.DataFrame accepts lists as input – Derek Eden Nov 26 '19 at 03:06
1 Answers
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

Rory LM
- 160
- 2
- 15
-
-
Oh, i though the contents of the list was one big string that needed to be separated – Rory LM Nov 26 '19 at 03:20
-