Issue
I’m running a Jupyter notebook on my iPad with an app called Carnets (vs. creating a remote server). I have been attempting to import a dataset into the notebook to create a panda’s dataframe.
So the dataset I’m tying to use is from kaggle. I first tried uploading it to GitHub LFS. I was able to successfully use pd.read_cvs(‘url’), but I only got a table of the meta data vs. the actual data set. I’m not certain I set up my LFS correctly but also haven’t been able to change it.
Next I tried using Kaggle’s API, but since I’m on a iPad I am unable to put the certificates in the required location.
I also attempted to use the local file path on my iPad but I’m not familiar with iOS file path conventions, so either I got it completely wrong and/or the way apps are packaged I can’t access the file path as a user input?
I recognize the root of the problem is doing this on a iPad Pro (1st model), but my computer is very old and stationary. I don’t have the funds to update and am stubborn enough to attempt this. I’ve used Juno semi-successfully in the recent past, but had problems with the app crashing so I wanted to try something else. I also don’t want to rely on Kaggle’s website for future projects that are not based on data from Kaggle.
# GitHub attempt
import pandas as pd
url_dipole_moments = 'https://raw.githubusercontent.com/ncotanche/PredictingMolecularProperties/master/RawData/dipole_moments.csv'
df_dipole_moments = pd.read_csv(url_diple_moments)
df_dipole_moments.head()
# Local file attempt
import pandas as pd
df_dipole_moments = pd.read_csv(‘../RadData/dipole_moments.csv’)
df_dipole_moments.head()
With the GitHub attempt, I received a data with version, iod, and size which I recognized as the metadata(?) for the file.
With the local file attempt, I received a FileNotFound error.
Solution
I’m the author of the app. The issue is related to iOS limitations on file access.
Carnets can access all files in the App directory. Since you have issues, I guess the notebook is not in the App directory, but in another App. By opening the notebook, you granted Carnets access to the notebook, but not to other files in the directory.
The solution is to grant Carnets access to the directory that contains both the notebook and the dataset: at the file open screen, navigate to the directory immediately above this one, then click “Select” (top right corner), then click on the directory, then click “Open”.
You will access a screen showing the content of that directory. Navigate to your notebook, and it should be able to access the dataset.
Answered By - N. Holzschuch
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.