pandas的简单例子 - Profee-L
pandas的简单例子
标签(空格分隔): pandas
#-*- coding: utf-8 -*-import pandas as pds = pd.Series([1,2,3], index=['a','b','c'])d = pd.DataFrame([[1,2,3],[4,5,6]], columns = ['a','b','c'])d2 = pd.DataFrame(s)>>> d.head() a b c0 1 2 31 4 5 6>>> d.describe() a b ccount 2.00000 2.00000 2.00000mean 2.50000 3.50000 4.50000std 2.12132 2.12132 2.12132min 1.00000 2.00000 3.0000025% 1.75000 2.75000 3.7500050% 2.50000 3.50000 4.5000075% 3.25000 4.25000 5.25000max 4.00000 5.00000 6.00000