使用Python库对数据集进行趋势分析?

问题描述 投票:-3回答:1

我有一个数据集,我进行了数据分析,现在我想找到1.趋势2.季节性3.预测4.山峰5.相关性6.此数据集的异常值

到目前为止,我所做的数据分析笔记本是https://github.com/glakshmi-nyros/notebook/blob/master/Seasonality%20Code%20Sara%20-Copy1%20(1).ipynb任何人都请帮助我,谢谢!

python pandas numpy machine-learning data-analysis
1个回答
0
投票

我希望这些方法可以为您提供帮助。

import pandas as pd
from pandas.plotting import scatter_matrix
%matplotlib inline <- only in jupyter
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns

#Plot hist from numerical variables
df.hist(bins=50, figsize=(20,15))
plt.show()

#make a matrix correlation for each variable numeric in your df
corr_matrix = df.corr()

#Make boxplot to get outliers
sns.set_style("whitegrid")
ax = sns.boxplot(x="COL_X", y="COL_Y", data=df, palette="Set3")

DF是您的数据框。这些方法非常通用,可能需要一些时间,具体取决于基础的大小。

以任何一种方式进行预测,季节性等,您将需要的信息比您真正想做的要多。

© www.soinside.com 2019 - 2024. All rights reserved.