Using the AI assistant

DataLab with SQL

Jasmin Ludolf

Senior Data Science and AI Content Developer, DataCamp

Generate code with AI

  • Always verify the generated output

GIF of DataLab using the AI assistant to generate code

DataLab with SQL

Generate code with AI

  • Specificity gives better results

GIF of DataLab showing the use of the AI assistant to generate code

DataLab with SQL

Generate code with AI

$$

SELECT sales_amount
FROM sales_data.csv
WHERE discount > 0.1 AND sales_rep = 'Bob' AND product_category = 'Clothing';
DataLab with SQL

Generate code from scratch

  • Better suited for Python and R generation

View of Datalab using the AI tool with Python

  • For SQL, it's best to have the data loaded first, then switch to AI

View of Datalab using the AI tool with SQL

DataLab with SQL

Debugging code with AI

GIF of DataLab showing use of the AI assitant to debug code

DataLab with SQL

Let's practice!

DataLab with SQL

Preparing Video For Download...