dataframe - Dataset uploaded and verified, but cannot use read.csv - Stack Overflow
I have uploaded a csv I created. This dataset is visible in Kaggle under "My datasets" - I can open and inspect it.
I have tried various ways of linking a dataset to my notebook.
- clicking the uploaded dataset in the Datasets tab, then selecting "New Workbook"
- creating a notebook, then uploading the dataset
- creating a notebook, then Add Input, and selecting my existing uploaded dataset
I then ran the tidyverse and readr libraries in the Notebook, and they loaded. However, I'm getting stuck at the read.csv.
I have tried all these:
df \<-read.csv("filename.csv")
df \<-read.csv(/%22filename.csv%22)
Any combination of the above, with and without " " ...
Errors I'm getting:
For 1.
Warning message in file(file, "rt"): “cannot open file 'filename.csv': No such file or directory” Error in file(file, "rt"): cannot open the connection Traceback:
- read.csv("filename.csv")
- read.table(file = file, header = header, sep = sep, quote = quote, . dec = dec, fill = fill, comment.char = comment.char, ...)
- file(file, "rt")
For 2.
Error in parse(text = x, srcfile = src): <text>:1:29: unexpected '/' 1: StudentDep <-read.csv(https:/ ^ Traceback:
I have uploaded a csv I created. This dataset is visible in Kaggle under "My datasets" - I can open and inspect it.
I have tried various ways of linking a dataset to my notebook.
- clicking the uploaded dataset in the Datasets tab, then selecting "New Workbook"
- creating a notebook, then uploading the dataset
- creating a notebook, then Add Input, and selecting my existing uploaded dataset
I then ran the tidyverse and readr libraries in the Notebook, and they loaded. However, I'm getting stuck at the read.csv.
I have tried all these:
df \<-read.csv("filename.csv")
df \<-read.csv(https://www.kaggle.com/datasets/myname/foldername/%22filename.csv%22)
Any combination of the above, with and without " " ...
Errors I'm getting:
For 1.
Warning message in file(file, "rt"): “cannot open file 'filename.csv': No such file or directory” Error in file(file, "rt"): cannot open the connection Traceback:
- read.csv("filename.csv")
- read.table(file = file, header = header, sep = sep, quote = quote, . dec = dec, fill = fill, comment.char = comment.char, ...)
- file(file, "rt")
For 2.
Share asked 15 hours ago Heike VauHeike Vau 1Error in parse(text = x, srcfile = src): <text>:1:29: unexpected '/' 1: StudentDep <-read.csv(https:/ ^ Traceback:
1 Answer
Reset to default 0To load a dataset in a Kaggle notebook in R:
mydatapath = "/kaggle/input/datasetname/datasetfile.csv"
df <-read.csv(mydatapath)
To know exactly the dataset path (mydatapath variable), look on the right where is written "Datasets" then click on the small black triangle next to your dataset name. A list of files will appear. Click on the icon looking like a stack of papers/rectangles on the right of your csv file and use CTRL+V in your notebook to paste the file path.
- 谷歌强推安卓8.0系统:明年所有APP都必须支持
- 传统杀毒软件市场受冲击 McAfee计划裁员7100人
- 研究机构:平板四年内将成主流计算设备
- 云计算是新的商业基础设施
- 应用软件战场:安卓不敌苹果
- reactjs - LLM Endpoint hosted in Azure databricks Response 200 but body is locked - Stack Overflow
- c# - Unity new input system generating multiple events - Stack Overflow
- Trouble installing homebrew with ansible playbook, linux client and host nodes - Stack Overflow
- typescript - How to keep autosuggestion with generics when working with keyof? - Stack Overflow
- python - Pyinstaller (Mac App) - Why only permission given to the executable file (instead of .app bundle) could work? - Stack O
- Why is my bot not able to detect when a user leaves in Telegram? - Stack Overflow
- php - Laravel Defer on API requests - Stack Overflow
- Scene Appears Completely Black on Android Build Despite Correct UI Rendering in Unity Editor - Stack Overflow
- php - Add Algorithm to the XML tag generated by SOAP - Stack Overflow
- c# - Microsoft.Extensions.Logging.LoggerFactory how to prevent an extra date to be added to the log filename - Stack Overflow
- Angular mfe with @module-federationenhanced having issue to use ngx-translate with remote apps - Stack Overflow
- Setting a global property for one web user in server function in Apps Script - Stack Overflow