i am trying to get certain data in a dataframe using for loop. But when i run the loop all i get is the index of the data not the values presented in the rows
import pandas as pd
import numpy as np
data = {'time' : [1,2,3,4,5,6,7,8,9,10,11,12], 'values'[290,260,288,300,310,303,329,340,316,330,308,310]}
df = pd.DataFrame(data)
for i in df:
print(i)
I only get the index not the values
I also tried:
for index , values in df:
print(values)
It gives me this error: cannot unpack non-iterable int object
I know iterrows give me rows but i want it as a complete dataframe not each rows