读取csv文件并打印其结果
In [5]: import pandas as pd
In [6]: df=pd.read_csv('https://raw.githubusercontent.com/alstat/Analysis-with-P
rogramming/master/2014/Python/Numerical-Descriptions-of-the-Data/data.csv')
In [7]: print(df)
Abra Apayao Benguet Ifugao Kalinga
0 1243 2934 148 3300 10553
1 4158 9235 4287 8063 35257
2 1787 1922 1955 1074 4544
3 17152 14501 3536 19607 31687
4 1266 2385 2530 3315 8520
5 5576 7452 771 13134 28252
6 927 1099 2796 5134 3106
7 21540 17038 2463 14226 36238
8 1039 1382 2592 6842 4973
9 5424 10588 1064 13828 40140
10 981 1311 2560 5078 3466
11 27366 15093 3039 14206 32395
12 1100 1701 2382 6750 6233
13 7212 11001 1088 14774 41634
14 1048 1427 2847 5526 4402
15 25679 15661 2942 14452 33717
16 1055 2191 2119 5882 7352
17 5437 6461 734 10477 24494
18 1029 1183 2302 6438 3316
19 23710 12222 2598 8446 26659
20 1091 2343 2654 9284 8067
21 7684 10038 974 12666 37094
22 1192 2668 2899 8347 8233
23 34200 11792 2964 14918 26014
24 1484 5521 3218 13284 19446
25 8584 8345 872 10287 30530
26 1173 3714 3202 8973 5553
27 32640 31357 3747 16595 29662
28 1484 5024 3247 12726 17581
29 8197 20326 938 5462 56701
.. ... ... ... ... ...
49 10758 45927 1767 6440 63029
50 1845 3560 4878 13388 7014
51 38166 42109 5300 20196 65920
52 2268 5450 4028 19630 22275
53 11239 41176 1768 6732 64958
54 2006 3450 4961 13654 7760
55 57488 54625 6045 21031 64122
56 2376 5336 3709 16177 27212
57 11606 38355 2412 11893 67285
58 2030 18416 2208 14880 9586
59 59516 39525 8813 20596 64034
60 5790 3606 3736 18750 21711
61 12202 41065 2697 10146 67631
62 2189 17808 2208 14570 12250
63 56121 37900 7580 20570 54595
64 5805 6265 3471 16537 17608
65 12206 34376 2289 7394 51168
66 2318 17356 3877 17785 18505
67 57282 38692 6143 18634 46985
68 6101 6206 3404 16000 22397
69 12763 37625 2354 9838 65782
70 2470 19532 4045 17125 15279
71 59094 35126 5987 18940 52437
72 6209 6335 3530 15560 24385
73 13316 38613 2585 7746 66148
74 2505 20878 3519 19737 16513
75 60303 40065 7062 19422 61808
76 6311 6756 3561 15910 23349
77 13345 38902 2583 11096 68663
78 2623 18264 3745 16787 16900
[79 rows x 5 columns]
In [8]:
读取csv文件并打印其结果的更多相关文章
- python之小应用:读取csv文件并处理01数据串
目的:读取csv文件内容,把0和1的数据串取出来,统计出现1的连续次数和各次数出现的频率次数 先读取csv文件内容: import csv def csv_read(file): list = [] ...
- python 读取CSV文件 中文乱码
今天读取一个CSV文件,打印出来,中文显示乱码,原因是编码的缘故,CSV保存是编码格式ANSI,解决办法是以记事本方式打开CSV文件,然后另存为时编码选择UTF-8进行保存即可.
- 使用pandas读取csv文件和写入文件
这是我的CSV文件 读取其中得tempo这一列 import pandas as pd #导入pandas包 data = pd.read_csv("E:\\毕设\\情感识别\\Music- ...
- sparkR读取csv文件
sparkR读取csv文件 The general method for creating SparkDataFrames from data sources is read.df. This met ...
- VB6.0 读取CSV文件
最近做了一个Upload文件的需求,文件的格式为CSV,读取文件的方法整理了一下,如下: 1.先写了一个读取CSV文件的Function: '读取CSV文件 '假设传入的参数strFile=C:\Do ...
- php读取csv文件,在linux上出现中文读取不到的情况 解决方法
今,php读取csv文件,在linux上出现中文读取不到的情况,google,后找到解决办法<?phpsetlocale(LC_ALL, 'zh_CN');$row = 1;$handle = ...
- 使用univocity-parsers创建和读取csv文件
import com.univocity.parsers.csv.CsvFormat;import com.univocity.parsers.csv.CsvParser;import com.uni ...
- Python 读取csv文件到excel
朋友问我如何通过python把csv格式的文件另存为xls文件,自己想了想通过读取csv文件然后再保存到xls文件中即可,也许还有其他简单的方法,但这里也为了练习python语法及其他知识,所以采用了 ...
- 转换成CSV文件、Word、Excel、PDF等的方法--读取CSV文件的方法
1. 转换成CSV文件: http://www.dotnetgallery.com/lab/resource93-Export-to-CSV-file-from-Data-Table-in-Aspne ...
随机推荐
- Linux常用命令汇总 - Linux Shell Cheat Sheet
1. 查看Linux操作系统信息: uname -a cat /proc/version lsb_release -a 2. 设置ls显示的文件夹的颜色(将下面这条目录加在 .bashrc 文件最后) ...
- [转]MongoDB基本使用
转自 : http://www.cnblogs.com/TankMa/archive/2011/06/08/2074947.html 成功启动MongoDB后,再打开一个命令行窗口输入mongo,就可 ...
- The "Out of socket memory" error
The "Out of socket memory" error I recently did some work on some of our frontend machines ...
- poj 2348 Euclid's Game 题解
Euclid's Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9023 Accepted: 3691 Des ...
- Sutherland-Hodgeman多边形裁剪
原文地址:http://course.cug.edu.cn/cugFirst/computer_graphics/class/course/3-3-1-a.htm
- Libnids(Library Network Intrusion Detection System) .
Libnids(Library Network Intrusion Detection System)是一个网络入侵检测开发的专业编程接口.它实现了基于网络的入侵检测系统的基本框架,并提供了一些基本的 ...
- Pascal's Triangle leetcode java(杨辉三角)
题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, ...
- javascript定义对象写法
javascript定义对象的几种简单方法 1.构造函数方式,全部属性及对象的方法都放在构造方法里面定义 优点:动态的传递参数 缺点:每创建一个对象就会创建相同的方法函数对象,占用大量内存 funct ...
- fastText、TextCNN、TextRNN……这里有一套NLP文本分类深度学习方法库供你选择
https://mp.weixin.qq.com/s/_xILvfEMx3URcB-5C8vfTw 这个库的目的是探索用深度学习进行NLP文本分类的方法. 它具有文本分类的各种基准模型,还支持多标签分 ...
- Pandas对行情数据的预处理
库里是过去抓取的行情数据,间隔6秒,每分钟8-10个数据不等,还有开盘前后的一些数据,用Pandas可以更加优雅地进行处理. 需要把当前时间设置为index df=df.set_index('time ...