---
# System prepended metadata

title: 第九週(0411)

---

# 第九週(0411)
1.import pandas as pd
grades = {
“學號”: [“A001”, “A002”, “A003”, “A004”, “A005”],
“體重”: [60, 50, 80, 75, 72],
“身高”: [165, 157, 182, 175, 170]
}
df = pd.DataFrame(grades)

for i in range(0,1):
print ( df.iat[i,0],df.iat[i,1],df.iat[i,2])
→A001 60 165

2.import pandas as pd
grades = {
“學號”: [“A001”, “A002”, “A003”, “A004”, “A005”],
“體重”: [60, 50, 80, 75, 72],
“身高”: [165, 157, 182, 175, 170]
}
df = pd.DataFrame(grades)

for i in range(0,5):
for j in range(i,i+1):
for k in range(i,i+1):
print(df.at[i, “學號”],df.at[i, “體重”],df.at[i, “身高”])
→
A001 60 165
A002 50 157
A003 80 182
A004 75 175
A005 72 170