import pandas as pd
data = pd.DataFrame([
{'name':'mglee', 'age': 23},
{'name':'python', 'age': 23},
{'name':'pandas', 'age': 23},
{'name':'datadog', 'age': 23},
])
# 아래와 같이 선언할수도 있음
data = pd.DataFrame({
"name": ["mglee", "python", "pandas", "datadog"],
"age": [23,23,23,23]
})
label orientied : inclusive of end
Location
position oriented : exclusive of end
Index location
data.iloc[0:1]
print(data)
# name age
# 0 mglee 23