• 大小:
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-02
  • 语言: Python
  • 标签: Python  可视化  

资源简介

python数据可视化编程实战(英文第二版)源代码

资源截图

代码片段和文件信息

import sys

filename = sys.argv[1]

with open(filename ‘rb‘) as hugefile:
    chunksize = 1000
    readable = ‘‘
    # if you want to stop after certain number of blocks 
    # put condition in the while
    while hugefile:  
        # if you want to start not from 1st byte
        # do a hugefile.seek(skipbytes) to skip 
        # skipbytes of bytes from the file start
        start = hugefile.tell()
        print “starting at:“ start
        file_block = ‘‘  # holds chunk_size of lines
        for _ in range(start start + chunksize):
            line = hugefile.next()
            file_block = file_block + line
            print ‘file_block‘ type(file_block) file_block
        readable = readable + file_block
        # tell where are we in file
        # file IO is usually buffered so tell() will not be precise for
        # every read.
        stop = hugefile.tell()
        print ‘readable‘ type(readable) readable
        print ‘reading bytes from %s to %s‘ % (start stop)
        print ‘read bytes total:‘ len(readable)
        
        raw_input()


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       15087  2015-11-23 13:20  PythonDataVisualizationCookbookSE_Code\B03772_Software_Hardware_List.docx
     目录           0  2015-11-23 12:58  PythonDataVisualizationCookbookSE_Code\Chapter 02\
     文件        1076  2013-02-16 15:50  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-chunk-read.py
     文件         710  2013-03-03 16:10  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-clean-boxplot.py
     文件         398  2013-03-03 16:48  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-clean-log.py
     文件        1311  2013-03-03 15:33  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-clean-mad.py
     文件         515  2013-01-27 17:32  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-csvread.py
     文件         287  2013-01-24 23:21  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-csvwrite.py
     文件         119  2013-01-27 16:47  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-data.csv
     文件         130  2013-02-05 00:54  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-data.tab
     文件         136  2013-02-05 01:42  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-data-dirty.tab
     文件         141  2013-01-24 23:21  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-data-write.csv
     文件         141  2013-02-05 01:13  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-data-write.tab
     文件        3322  2013-02-23 23:43  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-export.py
     文件         371  2013-02-04 23:58  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-fixedwidth-read.py
     文件         298  2013-02-04 23:42  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-generate_f_data.py
     文件         179  2013-02-25 21:43  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-imgread-matplotlib.py
     文件         129  2013-02-28 20:49  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-imgshow-lena.py
     文件         238  2015-06-11 13:18  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-imgshow-pil.py
     文件         538  2015-06-11 13:15  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-imgshow-zoom.py
     文件         150  2015-06-11 13:00  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-jsonread-github.py
     文件         291  2013-03-03 22:06  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-noise-median-filter.py
     文件         460  2013-03-03 22:31  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-noise-moving-average.py
     文件        2441  2013-03-03 21:23  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-noise-scipy-smooth-1d.py
     文件        3552  2013-03-03 12:09  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-random-distributions.py
     文件         572  2013-03-03 11:06  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-random-random.py
     文件         377  2013-03-02 16:33  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-random-systemrandom.py
     文件         440  2013-03-03 11:15  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-random-timeseries.py
     文件         562  2013-02-17 18:51  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-sqlite-import.py
     文件         688  2013-02-17 20:06  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-sqlite-read.py
     文件         744  2013-02-24 23:51  PythonDataVisualizationCookbookSE_Code\Chapter 02\ch02-stream-read-1.py
............此处省略96个文件信息

评论

共有 条评论