# -*- coding: UTF-8 -*-
# 作者：huanhuilong
# 标题：pandas dataframe 3.2
# 描述：iloc 操作过滤掉中间人信息
# 输出：
# 0    Alice
# 1      Bob
# Name: 0, dtype: object
#
# 0    10
# 1    12
# Name: 1, dtype: object
#
# 0      在么
# 1    你说呢？
# Name: 2, dtype: object

import pandas as pd


def test():
    d = [
        ['Alice', 'Bob', 'Middle'],
        [10, 12, 0],
        ['在么', '你说呢？', '今晚有事']
    ]

    df = pd.DataFrame(d)
    for i in range(0, len(d)):
        row = df.iloc[i][:2]
        print(row)
        print('')


if __name__ == '__main__':
    test()
