NAME

Data::Frame::Indexer - Function interface for indexer

VERSION

version 0.004_001

DESCRIPTION

A basic feature needed in a data frame library is the ability of subsetting a data frame by either numeric indices or string labels of columns and rows. Because of the ambiguity of number and string in Perl, there needs a way to allow user to explicitly specify whether their indexer is by numeric indices or string labels. This modules provides functions that serves this purpose.

FUNCTIONS

loc($x)

Returns either undef or an indexer object, by trying below rules,

  • If called with no arguments or if the argument is undef, return undef.

  • If the argument is an indexer object, just return it.

  • If the argument is a PDL of numeric types, create an indexer object

    of Data::Frame::Indexer::ByIndex

  • Fallbacks to create an indexer object of

    Data::Frame::Indexer::ByLabel.

iloc($x)

Similar to loc but would fallback to an indexer object of Data::Frame::Indexer::ByIndex.

AUTHORS

  • Zakariyya Mughal <zmughal@cpan.org>

  • Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

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.