0% found this document useful (0 votes)
12 views9 pages

Chapter10

Chapter 10 focuses on data analysis and visualization using Python, specifically through the use of the pip package manager and working with XLS files using the pyexcel_xls and XlsxWriter modules. It provides examples of how to read from and write to XLS files, as well as an introduction to creating XLSX files with basic data. The chapter also mentions additional functionalities like using formulas, formatting, and charts with XlsxWriter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

Chapter10

Chapter 10 focuses on data analysis and visualization using Python, specifically through the use of the pip package manager and working with XLS files using the pyexcel_xls and XlsxWriter modules. It provides examples of how to read from and write to XLS files, as well as an introduction to creating XLSX files with basic data. The chapter also mentions additional functionalities like using formulas, formatting, and charts with XlsxWriter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPSX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Chapter 10:

Data Analysis and


Visualization

© NIIT Slide 1 of 9
Objectives
By the end of this session, you should be able to understand:
• Using pip package manager
• Working with XLS files – pyexcel_xls & xlsxwriter

© NIIT Slide 2 of 9
XLS
• Spreadsheets are a very commonly used tool for a lot of data
crunching and day to day office tasks of reporting and presenting
analysis.

Let us explore how to make your python program work with the data
that is stored in an XLS file both in terms of reading as well as writing.

© NIIT Slide 3 of 9
XLS
Module : pyexcel_xls

pip install pyexcel_xls

© NIIT Slide 4 of 9
XLS
• Writing to an XLS file using pyexcel:

from pyexcel_xls import save_data


data= {"sheet 1":[[1,2,3],[4,5,6]] }
save_data("d:\\t1.xls",data)

© NIIT Slide 5 of 9
XLS
• Reading an XLS file using pyexcel:

from pyexcel_xls import read_data


data=read_data(“d:\\t1xls”)
print(data)

# data can be used as a dictionary containing sheet names as the key


and the value as a 2-Dimensional list.

© NIIT Slide 6 of 9
XLS
Modulename : XlsxWriter

• Get and install the module


pip install XlsxWriter

© NIIT Slide 7 of 9
xlsxwriter : Introduction
import xlsxwriter

workbook = xlsxwriter.Workbook('d:\\test.xlsx')
worksheet = workbook.add_worksheet()

worksheet.write('A1', 'Test data')

workbook.close()

© NIIT Slide 8 of 9
xlsxwriter
Demonstrations to include – Using formulae, formatting, charts etc.

Further information:
http://xlsxwriter.readthedocs.io

© NIIT Slide 9 of 9

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy