GithubHelp home page GithubHelp logo

csvstream's Introduction

awdeorio's dot files

This repository contains all of the configuration files in my home directory.

Files of particular interest

.always_forget.txt is an extensive cheat sheet of UNIX commands.

.bashrc contains my shell customizations.

Install

git clone [email protected]:awdeorio/dotfiles.git
rsync -av dotfiles/ ~/
rm -rf dotfiles/

csvstream's People

Contributors

amirkamil avatar awdeorio avatar campisano avatar fpohtmeh-old avatar ianbtr avatar vai-mikar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

csvstream's Issues

Line 289

Line 289 supposed to be if (row.size() != header.size()), please check?

Quoted data

Add support for quoted data. For example:

name,age
"DeOrio, Drew",31

Code coverage

Measure code coverage of unit tests. Report coverage using a badge on the README.

[Feature request] Retreive data keeping the CSV column order

Hi,

the std::map does not grant the order of inserted items. This is bad in my case because I want to analyze spatial time series that are contained in a CSV files, where each column represent a sensor in a fixed spatial position. I need to retrieve first the first column, then the second column, and so on. I'm not using a header to know what column come first (I could resolve modifying the CSV), so the column name can not help.

while(csvin >> row)
{
    // from column 0 to N
    //     do something
}

Thanks,
Riccardo

DEBUG output

There's a line that prints DEBUG output in csvstream.h

Support escaped quotes

Add support for escaped quotes. For example:

stringstream iss("\"a\",b,c\n\"\\\"1\\\"\",2,3\n");

include guards

For the 280 project, at least, I think we need to have these.

include guards

For the 280 project, at least, I think we need to have these.

GCC-7 support

Compiling with GCC-7 yields the following error:

csvstream.h:113:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
       state = UNQUOTED;
       ~~~~~~^~~~~~~~~~

Be sure to update .travis.yml to include gcc-7 in the build matrix.

.h -> .hpp

Suggest considering either of the following:

  1. Change the library to a .hpp extension
  2. Make a parallel version of the library available as .hpp

This suggestion follows a change in EECS 280 at the University of Michigan (where csvstream is used in course projects) from .h to .hpp as the preferred extension for C++ development.

Add example to documentation for eecs280 p5

Adding an example of using the square bracket operator to the main example will be helpful for our students so that they know that can do e.g. row["tag"] or row["content"] to just pick out the piece they want.

Better traversal by index example

csvstream can return a row of data either a map or as a vector of pair. Do a better job of showing how to use the vector in example 3.

Support Windows line endings

Add support for Windows line endings (\r\n), old OSX line endings (\r) in addition to UNIX line endings (\n).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.