user6186914
user6186914

Reputation:

how to used mysql dataset in time series forecasting

Pandas Time series Forecasting does only work with csv file because i want to forecast my database values for next 6 months. I did fetched the data from database in my python code that means i have data as query not in csv file.So how can i used time series forecasting method. i am using this link for forecasting http://www.analyticsvidhya.com/blog/2016/02/time-series-forecasting-codes-python/#comment-111179 In this link they used pd.read_csv(file)

Upvotes: 1

Views: 1037

Answers (1)

welch
welch

Reputation: 964

Instead of pd.read_csv, use pd.read_sql to get a database query result as a Pandas DataFrame.

You can read all about it in the Pandas documentation.

Upvotes: 2

Related Questions