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_csv with zip file #1471

Closed
ggrothendieck opened this issue Feb 16, 2023 · 1 comment
Closed

read_csv with zip file #1471

ggrothendieck opened this issue Feb 16, 2023 · 1 comment

Comments

@ggrothendieck
Copy link

ggrothendieck commented Feb 16, 2023

I have a zip file on Windows that contains a directory tree of csv files. I tried and it just read the first csv file.

read_csv("myzip.zip", id = "id")

There are two problems:

  • the help file has no information on how this is supposed to work.
  • it would be nice if it read all the csv files and not just the first. It is unlikely that there are many actual applications where one wants to just read the first csv in a zip file containing a directory tree of many csv's.

If I separately unzip the zip file and then use read_csv giving it a character vector of all the csv file paths then it does work.

@hadley
Copy link
Member

hadley commented Jul 31, 2023

We're just mimicking the behaviour of read.csv() here. I'd definitely recommend unzipping and parsing yourself.

@hadley hadley closed this as completed Jul 31, 2023
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