-: In this video, you're gonna learn
about something called interactive tables
inside of ChatGPT.
Interactive tables are a new feature
that allow you to dynamically update
and reference tables inside of ChatGPT,
both online on the chat application
and also on the desktop application.
Let's have a look at how this works.
I've got some sample data that we're gonna be using.
So I'm gonna drag in these two tables and see what happens.
So I'm just gonna drag in these two CSVs,
put these in and what happens is ChatGPT, when we hit enter,
it's gonna automatically render out
these interactive tables.
Now, what's interesting about this
is ChatGPT can reference specific columns.
It can even decide to join the tables.
If you have a look at the bottom,
you'll see that ChatGPT is analyzing.
If you click into that,
you'll see that it's loading in the specific data
before it can start doing extra operations.
So first, we're loading the additional employeedata.CSV,
and we're also loading the sample.employeedata.CSV,
and then it's printing the head,
and now it's analyzed the data
and it's giving a little bit of a summary
and it's asking that maybe we wanna merge those data sets.
So it's decided that it wants to merge these data sets,
and you can see that after that,
then it also generates a new interactive table.
Also, you can download these or expand these tables
to hit the entire screen.
When you expand it, then obviously you get
this expanded view and you've also got the ability
to ask questions on the right hand side.
Now I'm gonna go back and collapse it.
Now one thing that can be really cool
is ChatGPT automatically gives you hot actions
or quick actions that allow you to do things.
So for example, we could create a salary distribution chart.
So if I click this, then what happens is ChatGPT
underneath the hood is running Python code on your behalf,
and then it's actually calculating
and showing different types of charts.
So you can see here it's used some adblock lib code
in Python, and if we close this down,
you'll see this actually created a salary distribution.
So other things we could do is we could say
what is the mean age?
So we could say, what is the mean age?
And then ChatGPT will also run additional Python code
on side of that, so you can see it's worked out
that the mean age is 27.8 years.
We can click into the view the analysis,
and it's used a panda's package on the merged data column
in square brackets and it's got the dot mean, right?
So underneath the hood, when you upload CSV files directly
to ChatGPT, you are actually getting some Python operations
that are running in a sandbox environment
to do those types of calculations for you.
Now the great thing about these interactive tables
is you can easily download these as charts,
so you'll see if I download this as an output chart,
then I get a really nice output chart
that I could share with my boss.
So we could also get it to generate lots and lots
of different types of charts.
One other thing we might wanna do is, if you see here,
we've got the emails, we have the age,
and we've got all of the employees.
One thing we might want to get is, for example,
the mean salary, so let's say what is the mean salary?
All right, so the mean salary
of all the employees is $68,000.
Let's go and have a look and just spot check.
That does look about right.
The other thing I want to show you
is you can also specifically reference different columns.
So for example, we could say, if we click on this column,
notice how in the bottom,
you see that ChatGPT has the hire date column selected.
We could then say filter by this column for 2018.
And then because we've referenced this specific column,
it knows that we're probably
after filtering the data by the hire date.
So you can see now if we clicked on the operation,
it's filtering by the date of 2018,
and then we get a different table that's rendered out.
And so that's a great way to use these interactive tables.
You can reference specific columns,
and you can then use that in your ChatGPT at the bottom,
and you can also reference multiple columns
by holding the shift character as well.
So if you hold shift, you can see
that now ChatGPT is referencing three columns
or four columns or five columns,
so that's a really great way for you to limit
the amount of data that you specifically want
or just telling ChatGPT to focus on specific columns.
So a couple of interesting points here.
You get into those nice hot actions at the bottom,
you can reference columns,
you can download the interactive tables,
and you can even join data sets together,
and underneath the hood, everything's running
using a Python sandbox environment
so that it can scale to thousands
or hundreds of thousands of rows for you.