Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 35.436.914 Times

Data::CTable 1.03

  Date Added: February 06, 2010  |  Visits: 854

Data::CTable

Report Broken Link
Printer Friendly Version


Product Homepage
Download (79 downloads)



Data::CTable is a Perl module that helps you read, write, manipulate tabular data. SYNOPSIS ## Read some data files in various tabular formats use Data::CTable; my $People = Data::CTable->new("people.merge.mac.txt"); my $Stats = Data::CTable->new("stats.tabs.unix.txt"); ## Clean stray whitespace in fields $People->clean_ws(); $Stats ->clean_ws(); ## Retrieve columns my $First = $People->col(FirstName); my $Last = $People->col(LastName ); ## Calculate a new column based on two others my $Full = [map {"$First->[$_] $Last->[$_]"} @{$People->all()}]; ## Add new column to the table $People->col(FullName => $Full); ## Another way to calculate a new column $People->col(Key); $People->calc(sub {no strict vars; $Key = "$Last,$First";}); ## "Left join" records matching Stats:PersonID to People:Key $Stats->join($People, PersonID => Key); ## Find certain records $Stats->select_all(); $Stats->select(Department => sub {/Sale/i }); ## Sales depts $Stats->omit (Department => sub {/Resale/i}); ## not Resales $Stats->select(UsageIndex => sub {$_ > 20.0}); ## high usage ## Sort the found records $Stats->sortspec(DeptNum , {SortType => Integer}); $Stats->sortspec(UsageIndex, {SortType => Number }); $Stats->sort([qw(DeptNum UsageIndex Last First)]); ## Make copy of table with only found/sorted data, in order my $Report = $Stats->snapshot(); ## Write an output file $Report->write(_FileName => "Rept.txt", _LineEnding => "mac"); ## Print a final progress message. $Stats->progress("Done!"); ## Dozens more methods and parameters available... OVERVIEW Data::CTable is a comprehensive utility for reading, writing, manipulating, cleaning and otherwise transforming tabular data. The distribution includes several illustrative subclasses and utility scripts. A Columnar Table represents a table as a hash of data columns, making it easy to do data cleanup, formatting, searching, calculations, joins, or other complex operations. The objects hash keys are the field names and the hash values hold the data columns (as array references). Tables also store a "selection" -- a list of selected / sorted record numbers, and a "field list" -- an ordered list of all or some fields to be operated on. Select() and sort() methods manipulate the selection list. Later, you can optionally rewrite the table in memory or on disk to reflect changes in the selection list or field list. Data::CTable reads and writes any tabular text file format including Merge, CSV, Tab-delimited, and variants. It transparently detects, reads, and preserves Unix, Mac, and/or DOS line endings and tab or comma field delimiters -- regardless of the runtime platform. In addition to reading data files, CTable is a good way to gather, store, and operate on tabular data in memory, and to export data to delimited text files to be read by other programs or interactive productivity applications. To achieve extremely fast data loading, CTable caches data file contents using the Storable module. This can be helpful in CGI environments or when operating on very large data files. CTable can read an entire cached table of about 120 megabytes into memory in about 10 seconds on an average mid-range computer. For simple data-driven applications needing to store and quickly retrieve simple tabular data sets, CTable provides a credible alternative to DBM files or SQL. For data hygiene applications, CTable forms the foundation for writing utility scripts or compilers to transfer data from external sources, such as FileMaker, Excel, Access, personal organizers, etc. into compiled or validated formats -- or even as a gateway to loading data into SQL databases or other destinations. You can easily write short, repeatable scripts in Perl to do reporting, error checking, analysis, or validation that would be hard to duplicate in less-flexible application environments. The data representation is simple and open so you can directly access the data in the object if you feel like it -- or you can use accessors to request "clean" structures containing only the data or copies of it. Or you can build your own columns in memory and then when youre ready, turn them into a table object using the very flexible new() method. The highly factored interface and implementation allow fine-grained subclassing so you can easily create useful lightweight subclasses. Several subclasses are included with the distribution. Most defaults and parameters can be customized by subclassing, overridden at the instance level (avoiding the need to subclass too often), and further overridden via optional named-parameter arguments to most major method calls..

Requirements: No special requirements
Platforms: Linux
Keyword: Ctable Data Datactable Libraries List Perl Module Programming Read Table Tabular Tabular Data Usageindex Write
Users rating: 0/10

License: Freeware Size: 153.6 KB
USER REVIEWS
More Reviews or Write Review


DATA::CTABLE RELATED
Libraries  -  Jifty::DBI::SchemaGenerator 0.29
Jifty::DBI::SchemaGenerator is a Perl module to generate table schemas from Jifty::DBI records. This module turns a Jifty::Record object into an SQL schema for your chosen database. At the moment, your choices are MySQL, SQLite, or PostgreSQL....
99.33 KB  
Libraries  -  dtRdr::Annotation::IO::YAML 0.0.11
dtRdr::Annotation::IO::YAML is a Perl module to read/write annotations from/to yml files. Methods init $io->init; items_for Return the hashrefs for a given book. @items = $io->items_for($book); insert $io->insert($object, %args);...
2.8 MB  
Libraries  -  Convert::PEM 0.07
Convert::PEM is Perl module that read/write encrypted ASN.1 PEM files. SYNOPSIS use Convert::PEM; my $pem = Convert::PEM->new( Name => "DSA PRIVATE KEY", ASN => qq( DSAPrivateKey SEQUENCE { version INTEGER, p INTEGER, q INTEGER, g...
20.48 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  I18N::LangTags::List 0.35
I18N::LangTags::List Perl module contains tags and names for human languages. SYNOPSIS use I18N::LangTags::List; print "Parlez-vous... ", join(, , I18N::LangTags::List::name(elx) || unknown_language, I18N::LangTags::List::name(ar-Kw) ||...
30.72 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  XML::TiePYX 0.05
XML::TiePYX is a Perl module to read or write XML data in PYX format via tied filehandle SYNOPSIS use XML::TiePYX; tie *XML,XML::TiePYX,file.xml open IN,file.xml or die $!; tie *XML,XML::TiePYX,*IN,Condense=>0; my $text=< tag...
7.17 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Fortran::Format 0.90
Fortran::Format is a Perl module to read and write data according to a standard Fortran 77 FORMAT. SYNOPSYS use Fortran::Format; my $f = Fortran::Format->new("2(N: ,I4,2X)"); print $f->write(1 .. 10); # prints the following: # N: 1 N: 2...
18.43 KB  
Libraries  -  PHP::Session 0.26
PHP::Session is a Perl module to read / write PHP session files. SYNOPSIS use PHP::Session; my $session = PHP::Session->new($id); # session id my $id = $session->id; # get/set session data my $foo = $session->get(foo);...
15.36 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB