简体   繁体   English

如何在时间序列预测中使用mysql数据集

[英]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. 熊猫时间序列预测仅适用于csv文件,因为我想预测未来6个月的数据库值。 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. 我确实在python代码中从数据库中获取了数据,这意味着我将数据作为查询而不是在csv文件中。所以我该如何使用时间序列预测方法。 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) 我正在使用此链接进行预测http://www.analyticsvidhya.com/blog/2016/02/time-series-forecasting-codes-python/#comment-111179在此链接中,他们使用了pd.read_csv(file)

Instead of pd.read_csv , use pd.read_sql to get a database query result as a Pandas DataFrame. 代替pd.read_csv ,使用pd.read_sql作为Pandas DataFrame获得数据库查询结果。

You can read all about it in the Pandas documentation . 您可以在Pandas文档中阅读所有相关信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM