Horje
python - iterate with the data frame Code Example
pandas loop through rows
for index, row in df.iterrows():
    print(row['c1'], row['c2'])

Output: 
   10 100
   11 110
   12 120
iterate over rows dataframe
df = pd.DataFrame([{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}])
for index, row in df.iterrows():
    print(row['c1'], row['c2'])
python - iterate with the data frame
# Option 1
for row in df.iterrows():
    print row.loc[0,'A']
    print row.A
    print row.index()

# Option 2
for i in range(len(df)) : 
  print(df.iloc[i, 0], df.iloc[i, 2]) 




Python

Related
rightclick in pygame Code Example rightclick in pygame Code Example
install python in centos7 Code Example install python in centos7 Code Example
how to get the mouse input in pygame Code Example how to get the mouse input in pygame Code Example
google-api-python-client python 3 Code Example google-api-python-client python 3 Code Example
print first word of a string python and return it Code Example print first word of a string python and return it Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7