Get startedGet started for free

Accessing data and files in DataLab

1. Accessing data and files in DataLab

Welcome to this video on accessing data and files in DataLab! Here, we'll learn how DataLab simplifies data connections. We'll also walk through adding and accessing files, connecting to a Google Spreadsheet, and viewing data using an explore cell. Let’s get started!

2. Datalab workbooks vs notebooks

Let's start by revisiting two key concepts. We've run through notebooks which contain cells and all your code and text. With DataLab our notebooks, along with other components like files and data connections, are kept inside Workbooks. Think a Workbook as a way to keep track of everything for a project. We can have multiple notebooks to organize different aspects of our project, with shared files and data connections.

3. Creating a new workbook

We can manage workbooks and create new ones from the side panel. Please note, during this course the side panel is hidden due to space constraints.

4. Data sources in DataLab

DataLab makes it simple to work with different types of data. Whether we have a local CSV file, a Google Spreadsheet, or need to pull data from a database, DataLab streamlines the process. Let’s look at how to view the data in some of these sources.

5. Adding an Explore cell

Explore cells allow us to quickly view and explore data sources. You can add an Explore cell directly to a notebook.

6. Viewing data using an Explore cell

Instead of writing queries, we can use explore cells to filter, sort, and view our data effortlessly.

7. Turning an Explore cell into a query

When we need to manipulate data further, we can convert an Explore cell into a SQL cell, allowing us to load the results into a DataFrame for deeper analysis.

8. Turning an Explore cell into a query

Running the SQL cell outputs the results as a DataFrame. A DataFrame is like a table in a spreadsheet or a neatly organized grid of data. It has rows (like individual records or entries) and columns (which represent different pieces of information about each record). Just like in a spreadsheet, you can sort, filter, and analyze this data easily.

9. Turning an Explore cell into a query

Here we rename the new DataFrame "reviews".

10. Connecting to a Google Spreadsheet

One common data source we might want to work with is Google Sheets. With DataLab, this integration is easy! Simply open the data connection panel, select ‘Google Sheets’ and follow the prompts to connect. Once linked, we can use an explore cell to view and analyze data immediately.

11. Adding and accessing files

To work with flat files, we start by uploading them into our workbook. Click on the files section, upload our CSV or JSON file, and we can start analyzing our data immediately using SQL or code cell.

12. Querying a local file

We can use SQL cells to run queries on local data files. Code cells can also access local data files.

13. Let's practice!

In this video, you learned how to add and access files in DataLab, connect a Google Spreadsheet, and explore your data using an explore cell. Let's practice!