> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-science-lab/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/data-science-lab/~/changes/lSgdXe3Do34tLrgwmc0c/project/tabs-for-a-data-science-lab-project/tabs-for-pyspark-environment/notebook/notebook-page/notebook-operations/datasets.md).

# Datasets

The Notebook page facilitates the user to select from the available the datasets. The user can add, upload, and read the Datasets using this tab.

{% hint style="info" %}
*Check out the given walk-through on how to add a dataset using the Notebook page,*
{% endhint %}

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FGKirBefKcT75ZNQM3sLh%2FCopy%20path.gif?alt=media&amp;token=6000d430-0dcc-45b9-a173-a9e8d3aa54a9" alt=""><figcaption><p>Reading a Data sandbox file using Copy Path</p></figcaption></figure>

## Adding a Dataset&#x20;

This section helps to understand the steps to add a new dataset inside a Notebook using the Datasets tab provided on the Notebook page.

* Navigate to the Notebook page.
* Click on the ***Datasets*** tab.
* It lists the available Datasets (It may not list any dataset, if it is a newly created Notebook).&#x20;

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2Fkc7HpusTbULbtl2rFYSq%2Fimage.png?alt=media&amp;token=e6bc165e-f59a-400c-bf5e-fd3a9d3ba51c" alt=""><figcaption></figcaption></figure>

* Click the ***Add*** icon provided for the Datasets.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2F4k8lSbZFHPqkIrb1aadB%2Fimage.png?alt=media&amp;token=adda00a3-fee1-4f66-aaf9-7e4f2ae76dc0" alt=""><figcaption></figcaption></figure>

* The ***Add Datasets*** page opens listing the available Datasets below.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2F5uG5WkhXfF97zsBpdTAZ%2Fimage.png?alt=media&amp;token=e5a5eb08-1598-4d81-9eeb-60eecfd75a85" alt=""><figcaption></figcaption></figure>

* Select a Dataset by using the checkbox provided next to it.
* Click the ***Add*** option.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FxoLu8J7UrlzgX53VC3NS%2Fimage.png?alt=media&amp;token=2aa7662b-59b3-49d7-bb6d-0b2b0dc2c2ab" alt=""><figcaption></figcaption></figure>

* A confirmation message appears.
* The selected Dataset(s) gets added to the Notebook and can be seen in the Datasets list.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FXyHAlYwHq1RjCMxmnOAP%2Fimage.png?alt=media&amp;token=2a6b4a04-6404-4353-be96-30391d463a34" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*&#x20;

* *The user can select multiple datasets using the checkboxes provided next to the datasets.*&#x20;
* *The Add option appears only after the user selects at least one dataset from the list.*
  {% endhint %}

## Uploading Datasets

The **Upload** option is provided for the Sandbox files inside the Data Science Notebook.

* Navigate to the ***Add Datasets*** panel from a Data Science Notebook.
* Click the ***Upload*** option.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2F5Iym4DtZFwfS7dlDisAm%2FUploadSandbox_4.png?alt=media&amp;token=44e3756c-2821-4d87-ac45-16c1312fbbbd" alt=""><figcaption></figcaption></figure>

* The Upload Data Sandbox window appears.
* Provide a Sandbox Name.
* Provide Description (it is optional).
* Use the Choose File option to select a file.
* Click the Save option to upload the selected file.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FK8gzok3sb5VUun3HDEtv%2FUploadSandbox_5.png?alt=media&amp;token=5bbf511f-262a-4cc0-8d64-dee6cc8b4ef3" alt=""><figcaption></figcaption></figure>

* A notification message appears to inform completion of the action.
* The uploaded file lists below with a checkbox to select it.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FQ1lqjWRwWYyRI1l5VxnO%2FUploadSandbox_6.png?alt=media&amp;token=91f6bfa1-e04e-47d5-af9a-eb8e7ae3d12a" alt=""><figcaption></figcaption></figure>

## ​Reading Datasets

* Datasets can be read in two methods as:
  * Using get\_data function datasets and data sandbox files (csv & xlsx files) can be read.
  * Using Copy Path functionality data sandbox files (xls, txt, png, json, jpg, jpeg, mp4 files) can be read.

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FQj2i8amU80HjpVQ7CmnC%2FReading_with_getData.png?alt=media&amp;token=0e14a297-cada-4bfe-be39-9202b36ded4f" alt=""><figcaption><p>Reading a Data Sandbox file using get_data function.</p></figcaption></figure>

<figure><img src="https://1025450693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Figrg2b2URgwMO5YmejDu%2Fuploads%2FmRzREExS3FEtZCKaHnIG%2FReadUsingcopyPath.png?alt=media&amp;token=4559c8d9-2d3c-4938-b516-f80c200443cf" alt=""><figcaption><p>Reading a Data Sandbox file Copy Path functionality.</p></figcaption></figure>
