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

typemap has no effect in CSV.read in Jupyter Notebook #1024

Closed
shuofanzhang opened this issue Sep 12, 2022 · 3 comments
Closed

typemap has no effect in CSV.read in Jupyter Notebook #1024

shuofanzhang opened this issue Sep 12, 2022 · 3 comments

Comments

@shuofanzhang
Copy link

CSV.read(HTTP.get("https://raw.githubusercontent.com/shuofanzhang/covid/main/Test_pos_over_time.csv").body,
DataFrame;
footerskip=2,
select = [1, 2, 6],
typemap = Dict(Float64 => String),
dateformat= "yyyy-mm-dd")

Try above code in Jupyter Notebook (6.4.8) with CSV v0.8.5, the resulting columns are not String but Float64.

Screen Shot 2022-09-12 at 1 14 19 AM

But the same codes works as expected in VS Code.

@nickrobinson251
Copy link
Collaborator

most likely in the VS Code environment a newer version of CSV.jl is being used. The latest version is v0.10. At this point v0.8 is relatively out-dated and in general we do not backport bugfixes to old versions. Is it possible for you to update to CSV.jl v0.10?

@shuofanzhang
Copy link
Author

I see, I just downloaded the newest Julia on my new laptop, so I thought everything was the latest.

It seems like I cannot update the CSV package, I get this information when I do status --outdated

Screen Shot 2022-09-12 at 7 49 11 PM

But I am not sure how to fix it...

@quinnj
Copy link
Member

quinnj commented Sep 13, 2022

It's not the clearest, but in the yellow (green?) text after CSV v0.8.5 it says Forecast, so that tells you the package that is "holding you back". I've made a PR here to update that package to be compatible w/ 1.0. Once we get CSV.jl 1.0 tagged, that should help these kinds of packages stay more up to date since they can just put compat at CSV: "1" and be done for a long time.

@quinnj quinnj closed this as completed Sep 13, 2022
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

3 participants