博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Pandas 查看数据
阅读量:4050 次
发布时间:2019-05-25

本文共 682 字,大约阅读时间需要 2 分钟。

– Start

import numpy as npimport pandas as pdpd.set_option('display.max_columns', 100)pd.set_option('display.max_rows', 100)pd.set_option('display.width', 1000)# http://www.csindex.com.cn/zh-CN/downloads/indices?lb=%E5%85%A8%E9%83%A8&xl=1# 通过读取 Excel 文件创建 DataFramedf = pd.read_excel("index300.xls", sheet_name="Price Return Index", index_col=0)# 查看所有行print(df)# 查看前 5 行print(df.head())print(df.head(5))# 查看后 5 行print(df.tail())print(df.tail(5))# 查看行标签(index),列标签(columns)和数据print(df.index)print(df.index.names)print(df.columns)print(df.values)# 查看基本统计信息print(df.info())print(df.describe())

– 更多参见:

– 声 明:转载请注明出处
– Last Updated on 2018-11-10
– Written by ShangBo on 2018-10-29
– End

你可能感兴趣的文章
机器学习实战之决策树二
查看>>
[LeetCode By Python]7 Reverse Integer
查看>>
[LeetCode By Python]121. Best Time to Buy and Sell Stock
查看>>
[LeetCode By Python]122. Best Time to Buy and Sell Stock II
查看>>
[LeetCode By Python]125. Valid Palindrome
查看>>
[LeetCode By Python]136. Single Number
查看>>
Android/Linux 内存监视
查看>>
Android2.1消息应用(Messaging)源码学习笔记
查看>>
CocoaPods实践之制作篇
查看>>
[Mac]Mac 操作系统 常见技巧
查看>>
苹果Swift编程语言入门教程【中文版】
查看>>
捕鱼忍者(ninja fishing)之游戏指南+游戏攻略+游戏体验
查看>>
iphone开发之SDK研究(待续)
查看>>
计算机网络复习要点
查看>>
Variable property attributes or Modifiers in iOS
查看>>
NSNotificationCenter 用法总结
查看>>
C primer plus 基础总结(一)
查看>>
剑指offer算法题分析与整理(三)
查看>>
pidgin-lwqq 安装
查看>>
mint/ubuntu安装搜狗输入法
查看>>