📌  相关文章
📜  选择一系列列 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:53.175000             🧑  作者: Mango

代码示例4
# Import pandas package
import pandas as pd
  
# Define a dictionary containing employee data
data = {'Name':['Jai', 'Princi', 'Gaurav', 'Anuj'],
        'Age':[27, 24, 22, 32],
        'Address':['Delhi', 'Kanpur', 'Allahabad', 'Kannauj'],
        'Qualification':['Msc', 'MA', 'MCA', 'Phd']}
  
# Convert the dictionary into DataFrame 
df = pd.DataFrame(data)
  
# iloc[row slicing, column slicing]
df.iloc [0:2, 1:3]