Code Monkey home page Code Monkey logo

Comments (4)

EricForgy avatar EricForgy commented on July 18, 2024

Update:

I just deleted columns 3-22 keeping just the first 2 Int64 columns:

julia> f = CSV.Source("my 2 cols.csv")
[snip]
    CSV.Options:
        delim: ','
        quotechar: '"'
        escapechar: '\\'
        null: ""
        dateformat: Base.Dates.DateFormat(Base.Dates.Slot[],"","english")
123000x2 Data.Schema:
 Trial, Timestep
 Int64,    Int64

julia> ds = Data.stream!(f,Data.Table)
Data.Table:
123000x2 Data.Schema:
 Trial, Timestep
 Int64,    Int64

        Column Data:
        [1,1,1,1,1,1,1,1,1,13000,3000,3000,3000,3000,3000,3000,3000,3000,3000]
        [0,3,6,9,12,15,18,21,24,2793,96,99,102,105,108,111,114,117,120]

This looks good.

Update:

Three columns also works: 2 Int64 and 1 Float64.

from csv.jl.

EricForgy avatar EricForgy commented on July 18, 2024

Update:

Hmm... if I open the CSV file in Excel and "Save as" CSV, then I can stream! the whole thing.

Update:

Trying to see any differences between the original CSV and the saved CSV.

from csv.jl.

EricForgy avatar EricForgy commented on July 18, 2024

It looks like my original CSV file had trailing commas at the end of each line I didn't notice before.

How could I make CSV.jl read a "bad" CVS file, etc, get it to handle an extra trailing comma, e.g. ignore it?

Edit: Unfortunately, these CSV files are coming from a third-party app and I can't control what comes out of it.

from csv.jl.

quinnj avatar quinnj commented on July 18, 2024

We now have the CSV.validate(file) function which takes the same arguments as CSV.read, but will give informative error information for improperly formatted csv data.

from csv.jl.

Related Issues (20)

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.