Data::Frame::IO::CSV - Partial class for data frame's conversion from/to CSV
version 0.0050_01
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 can be a file name string, a Path::Tiny object, or an opened file
$file
handle.
$dtype is a hashref associating column names to their types. Types
$dtype
can be the PDL type names like "long", "double", or names of some PDL's derived class like "PDL::SV", "PDL::Factor", "PDL::DateTime". If a column is not specified in $dtype, its type would be automatically decided.
"long"
"double"
"PDL::SV"
"PDL::Factor"
"PDL::DateTime"
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 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.
To install Alt::Data::Frame::ButMore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alt::Data::Frame::ButMore
CPAN shell
perl -MCPAN -e shell install Alt::Data::Frame::ButMore
For more information on module installation, please visit the detailed CPAN module installation guide.