先看代码: In [46]: import pandas as pd In [47]: data = [[1,2,3],[4,5,6]] In [48]: index = [0,1] In [49]: columns=['a','b','c'] In [50]: df = pd.DataFrame(data=data, index=index, columns=columns) In [51]: df Out[51]: a b c 0 1 2 3 1 4 5 6 1. loc--通过行标签索引行…