All Projects → rsylvian → Csvparser

rsylvian / Csvparser

Licence: mit
C++ parser for CSV file format

Labels

Projects that are alternatives of or similar to Csvparser

Node Csv Stringify
CSV stringifier implementing the Node.js `stream.Transform` API
Stars: ✭ 179 (+175.38%)
Mutual labels:  csv, parser
Sqlparser
Simple SQL parser meant for querying CSV files
Stars: ✭ 249 (+283.08%)
Mutual labels:  csv, parser
Omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc.
Stars: ✭ 148 (+127.69%)
Mutual labels:  csv, parser
Csv Parser
Fast, header-only, extensively tested, C++11 CSV parser
Stars: ✭ 90 (+38.46%)
Mutual labels:  csv, parser
Stream Parser
⚡ PHP7 / Laravel Multi-format Streaming Parser
Stars: ✭ 391 (+501.54%)
Mutual labels:  csv, parser
Node Csv
Full featured CSV parser with simple api and tested against large datasets.
Stars: ✭ 3,068 (+4620%)
Mutual labels:  csv, parser
Pxi
🧚 pxi (pixie) is a small, fast, and magical command-line data processor similar to jq, mlr, and awk.
Stars: ✭ 248 (+281.54%)
Mutual labels:  csv, parser
Node Csv Parse
CSV parsing implementing the Node.js `stream.Transform` API
Stars: ✭ 768 (+1081.54%)
Mutual labels:  csv, parser
Choetl
ETL Framework for .NET / c# (Parser / Writer for CSV, Flat, Xml, JSON, Key-Value, Parquet, Yaml, Avro formatted files)
Stars: ✭ 372 (+472.31%)
Mutual labels:  csv, parser
Csv Parser
A modern C++ library for reading, writing, and analyzing CSV (and similar) files.
Stars: ✭ 359 (+452.31%)
Mutual labels:  csv, parser
Swiftcsv
CSV parser for Swift
Stars: ✭ 511 (+686.15%)
Mutual labels:  csv, parser
Ssp
C++ CSV parser
Stars: ✭ 30 (-53.85%)
Mutual labels:  csv, parser
String Calc
PHP calculator library for mathematical terms (expressions) passed as strings
Stars: ✭ 60 (-7.69%)
Mutual labels:  parser
React Admin Import Csv
A csv file import button for react-admin
Stars: ✭ 63 (-3.08%)
Mutual labels:  csv
Csv File Validator
🔧🔦 Validation of CSV file against user defined schema (returns back object with data and invalid messages)
Stars: ✭ 60 (-7.69%)
Mutual labels:  csv
Cesil
Modern CSV (De)Serializer
Stars: ✭ 59 (-9.23%)
Mutual labels:  csv
Obonet
OBO-formatted ontologies → networkx (Python 3)
Stars: ✭ 64 (-1.54%)
Mutual labels:  parser
Yacr
Yet another CSV Reader
Stars: ✭ 62 (-4.62%)
Mutual labels:  csv
Re Txt
converts text-formats from one to another, it is very useful if you want to re-format a json file to yaml, toml to yaml, csv to yaml, ... etc
Stars: ✭ 59 (-9.23%)
Mutual labels:  csv
Q
q - Run SQL directly on CSV or TSV files
Stars: ✭ 8,809 (+13452.31%)
Mutual labels:  csv

CSVparser

CSVparser intends to be a simple C++ parser for the CSV file format.

What is a CSV file ?

CSV is a common, relatively simple file format that is widely supported by consumer, business, and scientific applications. Among its most common uses is moving tabular data between programs that natively operate on incompatible (often proprietary and/or undocumented) formats. This works because so many programs support some variation of CSV at least as an alternative import/export format.

Compilation

g++ CSVparser.cpp -std=c++0x

Usage

The following example shows how to make a simple usage of CSVparser.
Assuming a common CSV file :

Year,Make,Model
1997,Ford,E350
2000,Mercury,Cougar
#include <iostream>
#include "CSVparser.hpp"

int main(int argc, char **argv)
{
	try
    {
        csv::Parser file = csv::Parser("files/readme.csv");

        std::cout << file[0][0] << std::endl; // display : 1997
        std::cout << file[0] << std::endl; // display : 1997 | Ford | E350

        std::cout << file[1]["Model"] << std::endl; // display : Cougar

        std::cout << file.rowCount() << std::endl; // display : 2
        std::cout << file.columnCount() << std::endl; // display : 3

        std::cout << file.getHeaderElement(2) << std::endl; // display : Model
    }
    catch (csv::Error &e)
    {
        std::cerr << e.what() << std::endl;
    }
  	return 0;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].