Skip to content

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
Spinner
DataFrameas
df
variable
SELECT departments.dept_name, AVG(salaries.salary) AS average_salary
FROM employees.departments
JOIN employees.dept_emp ON departments.dept_no = dept_emp.dept_no
JOIN employees.salaries ON dept_emp.emp_no = salaries.emp_no
GROUP BY departments.dept_name
ORDER BY average_salary DESC;

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 London
map = folium.Map(location=[51.5074, -0.1278], zoom_start=12)

# Add a marker for London
folium.Marker(location=[51.5074, -0.1278], popup='London').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 online_retail.csv file into a DataFrame

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

Convert the InvoiceDate column to datetime

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

Filter the DataFrame for sales in 2011

df_2011 = df[df['InvoiceDate'].dt.year == 2011]

Group the sales by month and calculate the total sales for each month

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

Create a Plotly line plot of the monthly sales

fig = px.line(monthly_sales, x='InvoiceDate', y='Quantity', title='Monthly Sales in 2011') 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!