SlideShare a Scribd company logo
Python Data Utilities Adrian Klaver
Python Data Utilities Psycopg2 http://initd.org/pub/software/psycopg/ Current version 2.0.12 Using 2.0.6 Set up DictConnection .pgpass
Python Data Utilities Data manipulation Deal with NULL/None Order data by category_desc Do availability determination Pull in correct description and price Create rows
Python Data Utilities RTF (Rich Text Format) Program PyRTF Web site http://pyrtf.sourceforge.net/ Specifications http://www.biblioscape.com/rtf15_spec.htm Rewrite of code pyrtf-ng http://code.google.com/p/pyrtf-ng/ SVN only
Python Data Utilities RTF (Rich Text Format) Notes Default language EnglishAustralian Measurements Dimensions in twips 1inch = 1440 twips Fonts are in ½ points Name space Conflict with ReportLab
Python Data Utilities RTF (Rich Text Format) Layout Document Section Table Cell Paragraph Text
Python Data Utilities XLS Program Xlwt, xlrd, xlutils Web Site http://pypi.python.org/pypi/xlwt http://pypi.python.org/pypi/xlrd http://pypi.python.org/pypi/xlutils OpenOffice Excel docs http://sc.openoffice.org/excelfileformat.pdf Mailing List http://groups.google.com.au/group/python-excel
Python Data Utilities XLS Note Column width 1/256 of the width of the zero character using default font (first FONT record in the file). Layout Workbook Worksheet
Python Data Utilities PDF Program ReportLab Web site http://www.reportlab.org/rl_toolkit.html Mailing List http://two.pairlist.net/mailman/listinfo/reportlab-users
Python Data Utilities PDF NumberedCanvas http://code.activestate.com/recipes/546511/ Newer version works w/images  http://code.activestate.com/recipes/576832/ Notes Dimensions Dimensions in points 1 inch = 72 points. Origin Bottom left Array numbering in tables Column,Row Top left (0,0) Bottom right (-1,-1)
Python Data Utilities PDF Paragraph Use para.Paragraph to deal with & <> issues from reportlab.platypus import para

More Related Content

What's hot (8)

PPT
Using HDF5 and Python: The H5py module
The HDF-EOS Tools and Information Center
 
PDF
Rcpp
Ajay Ohri
 
PDF
Business logic with PostgreSQL and Python
Hubert Piotrowski
 
PDF
Map Analytics in Starcraft II
gy8
 
PDF
A Spot of TEI
Hugh Cayless
 
PDF
R crash course
Tomislav Hengl
 
DOC
Filelist
NeelBca
 
PDF
Map Analytics in Starcraft II
gy8
 
Using HDF5 and Python: The H5py module
The HDF-EOS Tools and Information Center
 
Rcpp
Ajay Ohri
 
Business logic with PostgreSQL and Python
Hubert Piotrowski
 
Map Analytics in Starcraft II
gy8
 
A Spot of TEI
Hugh Cayless
 
R crash course
Tomislav Hengl
 
Filelist
NeelBca
 
Map Analytics in Starcraft II
gy8
 

Viewers also liked (20)

PDF
Plotting data with python and pylab
Giovanni Marco Dall'Olio
 
PDF
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
PDF
PostgreSQL, Extensible to the Nth Degree: Functions, Languages, Types, Rules,...
Command Prompt., Inc
 
ODP
Basic Query Tuning Primer
Command Prompt., Inc
 
PDF
Not Just UNIQUE: Generalized Index Constraints
Command Prompt., Inc
 
ODP
The PostgreSQL Query Planner
Command Prompt., Inc
 
PDF
Londiste Replication system for PostgreSQL
elliando dias
 
PDF
Scaling PostgreSQL with Skytools
Gavin Roy
 
PDF
2014.10.15 Сергей Бурладян, Avito.ru
Nikolay Samokhvalov
 
ODP
Monitoreo tunning postgresql_2011
Lennin Caro
 
PDF
Mastering PostgreSQL Administration
Command Prompt., Inc
 
PDF
PostgreSQL: Un motor Impulsado por una comunidad
Santiago Zarate
 
PDF
PostgreSQL High Availability via SLONY and PG POOL II
Command Prompt., Inc
 
PPT
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Command Prompt., Inc
 
PDF
Pg migrator
Command Prompt., Inc
 
PDF
configuring a warm standby, the easy way
Command Prompt., Inc
 
PDF
Replication using PostgreSQL Replicator
Command Prompt., Inc
 
PDF
Backup and-recovery2
Command Prompt., Inc
 
PDF
Implementing the Future of PostgreSQL Clustering with Tungsten
Command Prompt., Inc
 
Plotting data with python and pylab
Giovanni Marco Dall'Olio
 
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
PostgreSQL, Extensible to the Nth Degree: Functions, Languages, Types, Rules,...
Command Prompt., Inc
 
Basic Query Tuning Primer
Command Prompt., Inc
 
Not Just UNIQUE: Generalized Index Constraints
Command Prompt., Inc
 
The PostgreSQL Query Planner
Command Prompt., Inc
 
Londiste Replication system for PostgreSQL
elliando dias
 
Scaling PostgreSQL with Skytools
Gavin Roy
 
2014.10.15 Сергей Бурладян, Avito.ru
Nikolay Samokhvalov
 
Monitoreo tunning postgresql_2011
Lennin Caro
 
Mastering PostgreSQL Administration
Command Prompt., Inc
 
PostgreSQL: Un motor Impulsado por una comunidad
Santiago Zarate
 
PostgreSQL High Availability via SLONY and PG POOL II
Command Prompt., Inc
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Command Prompt., Inc
 
configuring a warm standby, the easy way
Command Prompt., Inc
 
Replication using PostgreSQL Replicator
Command Prompt., Inc
 
Backup and-recovery2
Command Prompt., Inc
 
Implementing the Future of PostgreSQL Clustering with Tungsten
Command Prompt., Inc
 
Ad

More from Command Prompt., Inc (17)

PDF
Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Command Prompt., Inc
 
PDF
Temporal Data
Command Prompt., Inc
 
PDF
Go replicator
Command Prompt., Inc
 
PDF
Elephant Roads: a tour of Postgres forks
Command Prompt., Inc
 
PDF
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
PDF
5 Steps to PostgreSQL Performance
Command Prompt., Inc
 
PPT
Normalization: A Workshop for Everybody Pt. 2
Command Prompt., Inc
 
PPT
Normalization: A Workshop for Everybody Pt. 1
Command Prompt., Inc
 
PDF
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
PDF
Postgres for MySQL (and other database) people
Command Prompt., Inc
 
PDF
Building Grails applications with PostgreSQL
Command Prompt., Inc
 
PDF
Not Just UNIQUE: Exclusion Constraints
Command Prompt., Inc
 
PDF
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
PDF
Database Hardware Benchmarking
Command Prompt., Inc
 
PDF
Vertically Challenged
Command Prompt., Inc
 
PDF
Simpycity and Exceptable
Command Prompt., Inc
 
Howdah - An Application using Pylons, PostgreSQL, Simpycity and Exceptable
Command Prompt., Inc
 
Temporal Data
Command Prompt., Inc
 
Go replicator
Command Prompt., Inc
 
Elephant Roads: a tour of Postgres forks
Command Prompt., Inc
 
A Practical Multi-Tenant Cluster
Command Prompt., Inc
 
5 Steps to PostgreSQL Performance
Command Prompt., Inc
 
Normalization: A Workshop for Everybody Pt. 2
Command Prompt., Inc
 
Normalization: A Workshop for Everybody Pt. 1
Command Prompt., Inc
 
Integrating PostGIS in Web Applications
Command Prompt., Inc
 
Postgres for MySQL (and other database) people
Command Prompt., Inc
 
Building Grails applications with PostgreSQL
Command Prompt., Inc
 
Not Just UNIQUE: Exclusion Constraints
Command Prompt., Inc
 
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
Database Hardware Benchmarking
Command Prompt., Inc
 
Vertically Challenged
Command Prompt., Inc
 
Simpycity and Exceptable
Command Prompt., Inc
 
Ad

Python utilities for data presentation

  • 1. Python Data Utilities Adrian Klaver
  • 2. Python Data Utilities Psycopg2 http://initd.org/pub/software/psycopg/ Current version 2.0.12 Using 2.0.6 Set up DictConnection .pgpass
  • 3. Python Data Utilities Data manipulation Deal with NULL/None Order data by category_desc Do availability determination Pull in correct description and price Create rows
  • 4. Python Data Utilities RTF (Rich Text Format) Program PyRTF Web site http://pyrtf.sourceforge.net/ Specifications http://www.biblioscape.com/rtf15_spec.htm Rewrite of code pyrtf-ng http://code.google.com/p/pyrtf-ng/ SVN only
  • 5. Python Data Utilities RTF (Rich Text Format) Notes Default language EnglishAustralian Measurements Dimensions in twips 1inch = 1440 twips Fonts are in ½ points Name space Conflict with ReportLab
  • 6. Python Data Utilities RTF (Rich Text Format) Layout Document Section Table Cell Paragraph Text
  • 7. Python Data Utilities XLS Program Xlwt, xlrd, xlutils Web Site http://pypi.python.org/pypi/xlwt http://pypi.python.org/pypi/xlrd http://pypi.python.org/pypi/xlutils OpenOffice Excel docs http://sc.openoffice.org/excelfileformat.pdf Mailing List http://groups.google.com.au/group/python-excel
  • 8. Python Data Utilities XLS Note Column width 1/256 of the width of the zero character using default font (first FONT record in the file). Layout Workbook Worksheet
  • 9. Python Data Utilities PDF Program ReportLab Web site http://www.reportlab.org/rl_toolkit.html Mailing List http://two.pairlist.net/mailman/listinfo/reportlab-users
  • 10. Python Data Utilities PDF NumberedCanvas http://code.activestate.com/recipes/546511/ Newer version works w/images http://code.activestate.com/recipes/576832/ Notes Dimensions Dimensions in points 1 inch = 72 points. Origin Bottom left Array numbering in tables Column,Row Top left (0,0) Bottom right (-1,-1)
  • 11. Python Data Utilities PDF Paragraph Use para.Paragraph to deal with & <> issues from reportlab.platypus import para

Editor's Notes

  • #2: This is a test