Workspace
Romain Muzy/

Try out AI

0
Beta
Spinner

Speed Up Your Process Using the Workspace AI Assistant

Discover the power of our AI Assistant. Get started with exciting prompts that will supercharge your data workflow!

The sample dataset we'll use here consists of orders made with a UK-based online retailer from December 2010 to December 2011. Source of dataset.

1. Fix errors

The cell below contains an error. You can press "Fix & Explain" to get your AI Assistant to fix it for you and explain what was wrong with the code.

this_is_a_variable = 42
print(this_is_a_variable)

2. Speed Up Your SQL

We've connected the below cell to the Employees sample database. Thanks to your AI assistant, you no longer have to write SQL (or Python) yourself.

You can now

  1. Hover of the cell.
  2. Click on "AI".
  3. Enter your prompt and press the return key.

If we want to know in which departement the employees earn the most (on average), you can use this prompt:

List the average salary per departement, from most to least
Unknown integration
DataFrameavailable as
df
variable
SELECT emp_no, first_name, last_name
FROM employees.employees
WHERE gender = 'F'
This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

3. Let AI help you edit

The below code cell was generated using the following prompt.

Can you generate me a leaflet plot pointing to New York?

You can now use your AI Assistant to edit it

  1. Hover of the next cell.
  2. Click on "AI".
  3. Enter your prompt and press the return key.

You can for example try this prompt:

Can you point to London instead?
import folium

# Create a map centered around New York
map = folium.Map(location=[40.7128, -74.0060], zoom_start=12)

# Add a marker for New York
folium.Marker(location=[40.7128, -74.0060], popup='New York').add_to(map)

# Display the map
map
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score

import pandas as pd import plotly.express as px

Read the data from online_retail.csv

data = pd.read_csv('online_retail.csv')

Convert the InvoiceDate column to datetime

data['InvoiceDate'] = pd.to_datetime(data['InvoiceDate'])

Filter the data for the year 2011

data_2011 = data[data['InvoiceDate'].dt.year == 2011]

Group the data by month and calculate the total sales

monthly_sales = data_2011.groupby(data_2011['InvoiceDate'].dt.month)['Quantity'].sum().reset_index()

Create the Plotly plot

fig = px.bar(monthly_sales, x='InvoiceDate', y='Quantity', labels={'InvoiceDate': 'Month', 'Quantity': 'Sales'})

Show the plot

fig.show()

What else will you do with it?

It's up to you now! How will you use your new AI Assistant?

Looking for more prompts to try? The following tutorial has more: 10 Ways to Speed Up Your Analysis With the Workspace AI Assistant

Looking for more datasets to explore? We have a bunch of datasets your new AI Assistant will love to explore!

  • AI Chat
  • Code