How does iteritems() work in a loop within dataframe

122 Views Asked by At

I am stuck in the understanding of .iteritems(). I checked documents and code examples but that does not explain this specific case.

returns

Returns

from statsmodels.tsa.stattools import adfuller
pd.Series([adfuller(values)[1] < 0.05 for columns, values in returns.iteritems()], index = returns.columns)

It is showing,

result

I thought it is iterating rows, So I thoguth it would give me boolean per each row. However, it only gives me one boolean value per each index.

Would you please help me to understand why it works this way?

0

There are 0 best solutions below