techascent / tech.ml.dataset

A Clojure high performance data processing system
Eclipse Public License 1.0
660 stars 33 forks source link

for a certian csv file, too many columns are autodected #292

Closed behrica closed 2 years ago

behrica commented 2 years ago

the attached csv file has 3 columns. TMD parses it into 20 columns, I assume a few rows are strange.

Can we do better, or is it a problem of univocity parser ?

readr::read_csv of R does it correct. train.csv (1).zip

cnuernber commented 2 years ago

If it is univocity then I am going to put some time into make the clojure.data.csv pathway as fast as possible and switch. That will be one too many.

cnuernber commented 2 years ago

It parses fine for version 6.071:

tech.v3.dataset.parse-test> (ds/->dataset "test/data/issue-292.csv")
test/data/issue-292.csv [31962 3]:

| id | label |                                                                                                                                           tweet |
|---:|------:|-------------------------------------------------------------------------------------------------------------------------------------------------|
|  1 |     0 |                                           @user when a father is dysfunctional and is so selfish he drags his kids into his dysfunction.   #run |
|  2 |     0 |                      @user @user thanks for #lyft credit i can't use cause they don't offer wheelchair vans in pdx.    #disapointed #getthanked |
|  3 |     0 |                                                                                                                             bihday your majesty |
|  4 |     0 |                                                            #model   i love u take with u all the time in ur📱!!! 😙😎👄👅💦💦💦 |
|  5 |     0 |                                                                                                          factsguide: society now    #motivation |
|  6 |     0 |                              [2/2] huge fan fare and big talking before they leave. chaos and pay disputes when they get there. #allshowandnogo |
|  7 |     0 |                                                                       @user camping tomorrow @user @user @user @user @user @user @user danny… |
|  8 |     0 | the next school year is the year for exams.😯 can't think about that 😭 #school #exams   #hate #imagine #actorslife #revolutionschool #girl |
|  9 |     0 |                                                          we won!!! love the land!!! #allin #cavs #champions #cleveland #clevelandcavaliers  … |
| 10 |     0 |                                                                                                @user @user welcome here !  i'm   it's so #gr8 ! |
| 11 |     0 |                                  ↝ #ireland consumer price index (mom) climbed from previous 0.2% to 0.5% in may   #blog #silver #gold #forex |
| 12 |     0 |           we are so selfish. #orlando #standwithorlando #pulseshooting #orlandoshooting #biggerproblems #selfish #heabreaking   #values #love # |
| 13 |     0 |                                                                                             i get to see my daddy today!!   #80days #gettingfed |
| 14 |     1 |                                                                        @user #cnn calls #michigan middle school 'build the wall' chant '' #tcot |
| 15 |     1 |                                           no comment!  in #australia   #opkillingbay #seashepherd #helpcovedolphins #thecove  #helpcovedolphins |
| 16 |     0 |                                                                                         ouch...junior is angry😐#got7 #junior #yugyoem   #omg |
| 17 |     0 |                                                                                           i am thankful for having a paner. #thankful #positive |
| 18 |     1 |                                                                                                                           retweet if you agree! |
| 19 |     0 |                                                                     its #friday! 😀 smiles all around via ig user: @user #cookies make people |
| 20 |     0 |                                                                                      as we all know, essential oils are not made of chemicals.  |
| 21 |     0 |                   #euro2016 people blaming ha for conceded goal was it fat rooney who gave away free kick knowing bale can hit them from there. |
| 22 |     0 |                                                                           sad little dude..   #badday #coneofshame #cats #pissed #funny #laughs |
| 23 |     0 |                                            product of the day: happy man #wine tool  who's   it's the #weekend? time to open up & drink up! |
| 24 |     1 |                                                                                                 @user @user lumpy says i am a . prove it lumpy. |
| 25 |     0 |                                                  @user #tgif   #ff to my #gamedev #indiedev #indiegamedev #squad! @user @user @user @user @user |
cnuernber commented 2 years ago

Closing this as I don't see any issue from our side. Feel free to reopen later.

behrica commented 2 years ago

Cannot reproduce neither, weird...