Pandas基本介绍: pandas is an open source, BSD-licensed (permissive free software licenses) library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. 我们快速简单地看一下pandas中的基本数据结构,先从数据类型.索引.切片等…
Different Choices for Indexing 1. loc--通过行标签索引行数据 1.1 loc[1]表示索引的是第1行(index 是整数) import pandas as pd data = [[1,2,3],[4,5,6]] index = [0,1] columns=['a','b','c'] df = pd.DataFrame(data=data, index=index, columns=columns) print df.loc[1] ''' a 4 b 5 c…