Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference between File and Rows #893

Closed
timholy opened this issue Sep 10, 2021 · 2 comments
Closed

Difference between File and Rows #893

timholy opened this issue Sep 10, 2021 · 2 comments

Comments

@timholy
Copy link
Contributor

timholy commented Sep 10, 2021

Perhaps it's intended, but the attached file
facultyinvolvement.csv

gives different results when parsed via File and Rows:

julia> CSV.File("facultyinvolvement.csv") |> DataFrame
6×8 DataFrame
 Row │ Faculty  DBBS Approval Date  INTERVIEW Biochemistry  INTERVIEW Biomedical Informatics and Data Science  INTERVIEW Human and Statistical Genetics  THESIS CMTE Biochemistry  THESIS CMTE Biomedical 
     │ String7  String15            Missing                 Union{Missing, Int64}                              Union{Missing, Int64}                     Union{Missing, Int64}     Missing                
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ fac1     01/01/2020                         missing                                            missing                                   missing                         1                         
   2 │ fac2     01/01/2020                         missing                                                  2                                   missing                   missing 
   3 │ fac3     01/01/2020                         missing                                            missing                                         5                   missing 
   4 │ fac4     01/01/2020                         missing                                                  3                                         3                   missing 
   5 │ fac5     01/01/2020                         missing                                            missing                                   missing                         1                         
   6 │ fac6     01/01/2020                         missing                                            missing                                         3                         1 
                                                                                                                                                                                          2 columns omitted

julia> CSV.Rows("facultyinvolvement.csv") |> DataFrame
6×8 DataFrame
 Row │ Faculty     DBBS Approval Date  INTERVIEW Biochemistry  INTERVIEW Biomedical Informatics and Data Science  INTERVIEW Human and Statistical Genetics  THESIS CMTE Biochemistry  THESIS CMTE Biomedi 
     │ PosLenSt?  PosLenSt?          PosLenSt?              PosLenSt?                                         PosLenSt?                                PosLenSt?                PosLenSt?          
─────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ fac1        01/01/2020          missing                 missing                                            missing                                   1                         missing             
   2 │ fac2        01/01/2020          missing                 2                                                  missing                                   1                         missing
   3 │ fac3        01/01/2020          missing                 2                                                  5                                         1                         missing
   4 │ fac4        01/01/2020          missing                 3                                                  3                                         1                         missing
   5 │ fac5        01/01/2020          missing                 3                                                  3                                         1                         missing             
   6 │ fac6        01/01/2020          missing                 3                                                  3                                         1                         missing

It looks like any missing field borrows the result from the previous return value?

@quinnj
Copy link
Member

quinnj commented Sep 15, 2021

Yes, this was also reported in #903; an unfortunate side effect of an internal refactoring that happened for the 0.9 release.

@quinnj quinnj closed this as completed Sep 15, 2021
@timholy
Copy link
Contributor Author

timholy commented Sep 15, 2021

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants