Skip to content
New Workbook
Sign up
Try out AI

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.

Get started with AI, follow these steps:

  1. Hover on the space in between cells and add a new cell by clicking the "plus" icon or the line.
  2. Type in your first prompt.
  3. Click on "Ask AI" or press the return key.

1. Automatically Handle All Your Package Imports

Try this prompt:

Import the packages I will need to perform a machine learning classification task.
# Importing the required packages
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
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, confusion_matrix

2. Build Beautiful Visualizations

Try this Prompt:

Create a Plotly plot of monthly sales in 2011 based on online_retail.csv.
# Import the necessary libraries
import pandas as pd
import plotly.express as px

# Load the data
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 plot
fig = px.bar(monthly_sales, x='InvoiceDate', y='Quantity', labels={'InvoiceDate': 'Month', 'Quantity': 'Sales'}, title='Monthly Sales in 2011')

# Show the plot
fig.show()

3. Speed Up Your SQL

First create a SQL cell and select the "employees" sample database source. To the question "which countries do our customers purchase from?" using a SQL query, try this prompt:

Write a SQL query that lists the top 3 countries from which customers make purchases and run it against "online_retail.csv".

4. Write a Summary

Try this prompt:

Write a summary of the analysis in this workspace.

Analysis Summary

The analysis in this workspace focuses on the monthly sales in the year 2011 using the online_retail.csv dataset. The following steps were performed:

  1. Importing the necessary libraries, including pandas and plotly.express.
  2. Loading the data from the online_retail.csv file into a pandas DataFrame.
  3. Converting the InvoiceDate column to datetime format.
  4. Filtering the data for the year 2011.
  5. Grouping the data by month and calculating the total sales.
  6. Creating a bar plot using Plotly Express to visualize the monthly sales in 2011.

The analysis provides insights into the sales trends throughout the year 2011, allowing for better understanding of the business performance and potential areas for improvement.

5. Format Your Code

Directly below the code cell that follows, try this prompt:

Update the cell above to follow PEP 8 standards.
result=5+5;print(result)

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