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

read() reads the first column as a String #741

Closed
theogf opened this issue Sep 23, 2020 · 1 comment
Closed

read() reads the first column as a String #741

theogf opened this issue Sep 23, 2020 · 1 comment

Comments

@theogf
Copy link

theogf commented Sep 23, 2020

Hi!
When using CSV.jl v0.7.7 to read the CSV file "Flocking.csv" from here : https://archive.ics.uci.edu/ml/machine-learning-databases/00524/Swarm%20Behavior%20Data.zip, the first column is wrongly interpreted as a String.

using CSV, DataFrames
data = CSV.read("Flocking.csv", DataFrame)
### 
24016×2401 DataFrame. Omitted printing of 2395 columns
│ Row   │ x1       │ y1      │ xVel1   │ yVel1   │ xA1     │ yA1     │
│       │ String   │ Float64 │ Float64 │ Float64 │ Float64 │ Float64 │
├───────┼──────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ 1-1414.14-535.22-17.88-7.230.00.0###

When I tried to write a smaller version (20 rows instead of 24000 ) with CSV the problem did not occur when loading it again

@theogf
Copy link
Author

theogf commented Sep 23, 2020

Sorry I spoke too fast, after examining the data more carefully it seems that a value is missing in the last row for x.

@theogf theogf closed this as completed Sep 23, 2020
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

1 participant