Uploaded file not showing in notebook after restart

Hello guys,
i am trying to read one csv file after uploading it in juypter notebook but when i restart the notebook it get disappear please help before submission date i am already late

The file will disappear as soon as your connection to jupyter expires. So , other way around is to load it every time before you start working from local machine.

1 Like

but how could i submit it, without original data my notebook won’t work, can you please suggest some way

What I did was to create another Dataframe from the original data, the big CSV file. Then I used the write_csv command to write it to a CSV file. Then on the commit command, just add the file and it will be uploaded to your Jupyter Notebook. The only problem is… it will be uploaded only to the version you’re working on. If you save it again without passing the file, it won’t be available, there is another thread with this discussion.

Write to CSV file:

data_songs_df.to_csv('data_recent_years.csv')

Upload by commit:

jovian.commit(project=project, files=['data_recent_years.csv'])

Read the file:

data_songs_df = pd.read_csv('data_recent_years.csv', index_col=0)
2 Likes

One thing I did while working on the project was run load CSV command every time when l launched a jupyter instance… Similarly like Jovian.commit.
May be this is not the proper way but it worked for me. So mentioned it here

1 Like

Please see this, it will help you avoid manual download/upload:

1 Like

@all and aakansh sir thank you so much for all your reply,
I will try this solution tomorrow, also i have watched your video about how to download, i was struggling from last few days for it, every time i run notebook i have to upload the file, and today i finally did the submission, but i wil try again this method and resubmit.
Thanks again

what if our dataset is in csv and not online? I can’t upload my dataset because it is not online.

1 Like

Please go to https://www.kaggle.com/datasets and create a new Public dataset by clicking on “+ New Dataset” and uploading your file. Please make sure it is a public dataset. You can then use the dataset link to download the dataset using opendatsets.

Hey you can try uploading your csv on kaggle and then you can try.
Just create a id in kaggle and then upload your csv and thenk using link follow the solution