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.

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.

2. Build Beautiful Visualizations

Try this Prompt:

import pandas as pd import plotly.express as px # Load the dataset df = pd.read_csv("online_retail.csv") # Convert the InvoiceDate column to datetime df['InvoiceDate'] = pd.to_datetime(df['InvoiceDate']) # Filter the data for the year 2011 df_2011 = df[df['InvoiceDate'].dt.year == 2011] # Group the data by month and calculate the total sales monthly_sales = df_2011.groupby(df_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'}) # Show the plot fig.show()

SELECT Country, COUNT(*) AS TotalPurchases FROM online_retail GROUP BY Country ORDER BY TotalPurchases DESC LIMIT 3;

Summary of the Analysis

In this workspace, we performed several tasks related to AI and data analysis. Here is a brief summary of the analysis:

  1. Adding a New Cell: We learned how to add a new cell in Jupyter notebook by clicking the "plus" icon or using the keyboard shortcut. This allows us to add new prompts or code blocks.

  2. Building Beautiful Visualizations: We used the pandas and plotly libraries to create a bar plot of monthly sales data. The dataset was loaded from a CSV file, filtered for the year 2011, and grouped by month. The resulting plot showed the total sales for each month.

  3. SQL Query: We wrote an SQL query to retrieve the top three countries with the highest number of purchases from the "online_retail" table. The query grouped the data by country, calculated the total purchases, and sorted the results in descending order.

  4. Writing a Summary: We were prompted to write a summary of the analysis in this workspace. This summary provides an overview of the tasks performed and the key findings.

Overall, this workspace demonstrated how to perform various AI and data analysis tasks using Jupyter notebook and relevant libraries. The analysis included adding cells, creating visualizations, querying data with SQL, and summarizing the findings.

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