All Projects → osiegmar → Fastcsv

osiegmar / Fastcsv

Licence: mit
High performance CSV reader and writer for Java.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Fastcsv

dbd
dbd is a database prototyping tool that enables data analysts and engineers to quickly load and transform data in SQL databases.
Stars: ✭ 30 (-89.76%)
Mutual labels:  csv
jupyterlab-spreadsheet-editor
JupyterLab spreadsheet editor for tabular data (e.g. csv, tsv)
Stars: ✭ 72 (-75.43%)
Mutual labels:  csv
Node Csv
Full featured CSV parser with simple api and tested against large datasets.
Stars: ✭ 3,068 (+947.1%)
Mutual labels:  csv
spparser
an async ETL tool written in Python.
Stars: ✭ 34 (-88.4%)
Mutual labels:  csv
DataAnalyzer.app
✨🚀 DataAnalyzer.app - Convert JSON/CSV to Typed Data Interfaces - Automatically!
Stars: ✭ 23 (-92.15%)
Mutual labels:  csv
Compotes
A small app to manage bank account operations and display rich analytics. Demo app credentials are admin/admin. [In development]
Stars: ✭ 30 (-89.76%)
Mutual labels:  csv
data-models
Collection of various biomedical data models in parseable formats.
Stars: ✭ 23 (-92.15%)
Mutual labels:  csv
Csvkeychain
Import/export between Apple Keychain.app and plain CSV file.
Stars: ✭ 281 (-4.1%)
Mutual labels:  csv
text2json
Performant parser for textual data (CSV parser)
Stars: ✭ 33 (-88.74%)
Mutual labels:  csv
Sqawk
Like Awk but with SQL and table joins
Stars: ✭ 263 (-10.24%)
Mutual labels:  csv
django-csv-export-view
Django class-based view for CSV exports
Stars: ✭ 17 (-94.2%)
Mutual labels:  csv
brain-brew
Automated Anki flashcard creation and extraction to/from Csv
Stars: ✭ 55 (-81.23%)
Mutual labels:  csv
Comma Chameleon
A desktop CSV editor for data publishers
Stars: ✭ 259 (-11.6%)
Mutual labels:  csv
csv-to-sqlite
A desktop app to convert CSV files to SQLite databases!
Stars: ✭ 68 (-76.79%)
Mutual labels:  csv
Loaders.gl
Loaders for big data visualization. Website:
Stars: ✭ 272 (-7.17%)
Mutual labels:  csv
VBA-CSV-interface
The most powerful and comprehensive CSV/TSV/DSV data management library for VBA, providing parsing/writing capabilities compliant with RFC-4180 specifications and a complete set of tools for manipulating records and fields.
Stars: ✭ 24 (-91.81%)
Mutual labels:  csv
qwery
A SQL-like language for performing ETL transformations.
Stars: ✭ 28 (-90.44%)
Mutual labels:  csv
Sq
swiss-army knife for data
Stars: ✭ 275 (-6.14%)
Mutual labels:  csv
Flatfiles
Reads and writes CSV, fixed-length and other flat file formats with a focus on schema definition, configuration and speed.
Stars: ✭ 275 (-6.14%)
Mutual labels:  csv
Tableexport
tableExport(table导出文件,支持json、csv、txt、xml、word、excel、image、pdf)
Stars: ✭ 261 (-10.92%)
Mutual labels:  csv

FastCSV

build Codacy Badge codecov javadoc Maven Central

🚀 FastCSV 2.0 upgrade has landed with major improvements on performance and usability!

FastCSV is an ultra-fast and dependency-free RFC 4180 compliant CSV library for Java.

Actively developed and maintained since 2015 its primary intended use cases are:

  • big data applications to read and write data on a massive scale
  • small data applications with the need for a lightweight library

Benchmark

A selected benchmark from the Java CSV library benchmark suite project. Comparing to some other popular, dependency-free and small (< 100 KB) libraries.

Benchmark

Features

API

  • Ultra fast
  • Small footprint
  • Zero runtime dependencies
  • Null-free

CSV specific

  • RFC 4180 compliant – including:
    • Newline and field separator characters in fields
    • Quote escaping
  • Configurable field separator
  • Support for line endings CRLF (Windows), CR (old Mac OS) and LF (Unix)
  • Unicode support

Reader specific

  • Support reading of some non-compliant (real world) data (see comparison with other libraries)
  • Preserving line break character(s) within fields
  • Preserving the original line number (even with skipped and multi line records) – helpful for error messages
  • Auto detection of line delimiters (can also be mixed)
  • Configurable data validation
  • Support for (optional) header lines (get field based on column name)
  • Support for skipping empty rows
  • Support for commented lines (skipping & reading) and configurable comment character

Writer specific

  • Support for multiple quote strategies to differentiate between empty and null

Requirements

  • Java 8

💡 Android is not Java and is not officially supported. Although some basic checks are included in the continuous integration pipeline in order to verify that the library should work with Android 8.0 (API level 26).

CsvReader Examples

Iterative reading of some CSV data from a string

CsvReader.builder().build("foo1,bar1\r\nfoo2,bar2")
    .forEach(System.out::println);

Iterative reading of some CSV data with a header

NamedCsvReader.builder().build("header 1,header 2\nfield 1,field 2")
    .forEach(row -> row.getField("header 2"));

Iterative reading of a CSV file

try (CsvReader csv = CsvReader.builder().build(path, charset)) {
    csv.forEach(System.out::println);
}

Custom settings

CsvReader.builder()
    .fieldSeparator(';')
    .quoteCharacter('"')
    .commentStrategy(CommentStrategy.SKIP)
    .commentCharacter('#')
    .skipEmptyRows(true)
    .errorOnDifferentFieldCount(false);

For more example see CsvReaderExample.java

CsvWriter Examples

Iterative writing of some data to a writer

CsvWriter.builder().build(new PrintWriter(System.out, true))
    .writeRow("header1", "header2")
    .writeRow("value1", "value2");

Iterative writing of a CSV file

try (CsvWriter csv = CsvWriter.builder().build(path, charset)) {
    csv
        .writeRow("header1", "header2")
        .writeRow("value1", "value2");
}

Custom settings

CsvWriter.builder()
    .fieldSeparator(',')
    .quoteCharacter('"')
    .quoteStrategy(QuoteStrategy.REQUIRED)
    .lineDelimiter(LineDelimiter.LF);

For more example see CsvWriterExample.java

Upgrading from version 1.x

Please see UPGRADING.md for an overview of the main functionality of 1.x and how to upgrade them to version 2.

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].