zealot/dataframe

lightweight lib to find/read/write files/csv files

2.0.0 2018-05-17 13:33 UTC

This package is not auto-updated.

Last update: 2024-10-04 23:30:03 UTC


README

Lib to work with csv files/assoc arrays like DB table. For now implemented only whereIn(); (yeap, been inspired by pandas)

Getting Started

$pathToCsvFile = '/tmp/csvfile_emails.csv';

$utils = new IOUtils();
$dataFrame = $utils->fromCsvFile($pathToCsvFile);
$filteredDF = $dataFrame->filter()->whereIn('email', ['sturkin30@gmail.com'])->get();

foreach ($filteredDF->getAssocArrayIterator() as $line) {
    var_dump($line);
}

//$utils->toCsvFile($filteredDF,'path to file')

Installing

composer require zealot/dataframe