GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Frame::IO::CSV(3) User Contributed Perl Documentation Data::Frame::IO::CSV(3)

Data::Frame::IO::CSV - Partial class for data frame's conversion from/to CSV

version 0.006004

    from_csv($file, :$header=true, :$sep=',', :$quote='"',
             :$na=[qw(NA BAD)], :$col_names=undef, :$row_names=undef, 
             Map[Str, DataType] :$dtype={},
             :$strings_as_factors=false)

Create a data frame object from a CSV file. For example,

    my $df = Data::Frame->from_csv("foo.csv");

Some of the parameters are explained below,

  • $file

    This can be a file name string, a Path::Tiny object, or an opened file handle.

  • $dtype

    A hashref associating column names to their types. Types can be the PDL type names like "long", "double", or "pdlsv", "factor", "datetime", "logical". If a column is not specified in $dtype, its type is automatically decided.

  • $na

    An arrayref of strings which are to be interpreted as "BAD" values. Blank fields are also considered to be missing value in logical and numeric fields.

    to_csv($file, :$sep=',', :$quote='"', :$na='NA',
           :$col_names=true, :$row_names=true)

Write the data frame to a csv file.

  • Zakariyya Mughal <zmughal@cpan.org>
  • Stephan Loyd <sloyd@cpan.org>

This software is copyright (c) 2014, 2019-2022 by Zakariyya Mughal, Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2024-12-20 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.