import numpy as np
import pandas as pd
df_maize = pd.read_csv("PSD online data maize.csv", thousands=',')]
df_maize.corr()
相関係数の計算まではできましたが以下の検定でエラーが起きました
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.stats import spearmanr
bs=df_maize['Beginning Stocks'].values
es=df_maize['Ending Stocks'].values
p_value=df_maize.corr[0]
TypeError Traceback (most recent call last)
<ipython-input-11-9b62ddc60036> in <module>
1 bs=df_maize['Beginning Stocks'].values
2 es=df_maize['Ending Stocks'].values
----> 3 p_value=df_maize.corr[0]
TypeError: 'method' object is not subscriptable