top of page
Writer's pictureThe Tech Platform

A Guide to Microsoft Fabric Copilot for Data Science and Data Engineering

In the world of data science and data engineering, possessing the appropriate tools for data analysis is crucial. Microsoft Fabric’s Copilot is one such tool that has been garnering attention in the industry. This powerful AI assistant, seamlessly integrated into the Fabric notebook environment, is designed to accelerate your workflow, enhance your productivity, and make your data-related tasks more efficient.


This guide aims to provide an in-depth look into the capabilities of Microsoft Fabric’s Copilot for both Data Science and Data Engineering. From creating a workspace to generating code and querying data, to providing natural language explanations of notebook cells, Copilot is here to assist you every step of the way.


Microsoft Fabric and Copilot

Copilot in Microsoft Fabric is an AI-enhanced toolset tailored to support data professionals in their workflow. It provides intelligent code completion, automates routine tasks, and supplies industry-standard code templates to facilitate building robust data pipelines and crafting complex analytical models.


Utilizing advanced machine learning algorithms, Copilot offers contextual code suggestions that adapt to the specific task at hand, helping you code more effectively and with greater ease.


Microsoft Fabric's Copilot for Data Science and Data Engineering

Microsoft Fabric's Copilot is an AI assistant that helps analyze and visualize data. It works with Lakehouse tables and files, Power BI Datasets, and pandas/spark/fabric dataframes, providing answers and code snippets directly in the notebook. The most effective way of using Copilot is to add your data as a dataframe.


Copilot in Microsoft Fabric is designed to handle large datasets effectively.

  • Dataframe Usage: The most effective way of using Copilot is to add your data as a dataframe1. This allows Copilot to efficiently manage and process large datasets.

  • Data Understanding: Copilot understands your data’s schema and metadata. If data is loaded into a dataframe, it has awareness of the data inside of the data frame as well1. This understanding allows it to handle large datasets intelligently.

  • Code Generation: You can ask Copilot to provide insights on data, create code for visualizations, or provide code for data transformations1. This can be particularly useful when dealing with large datasets, as it can automate many tasks that would otherwise be time-consuming.



Examples of tasks that can be accomplished with Microsoft Fabric's Copilot:

  • Automated Data Analysis: Copilot can automate complex data analysis tasks. For instance, it can quickly analyze trends, perform advanced calculations, and generate comprehensive reports.

  • Efficient Email Management: It streamlines email management by prioritizing essential emails, scheduling responses, and organizing your inbox efficiently.

  • Enhanced Document Creation: Copilot aids in creating more effective documents by suggesting content improvements, formatting options, and even generating text based on brief prompts.

  • Custom Support Chatbots: Develop AI-powered chatbots using Copilot to handle customer inquiries.

  • Tailored Data Analytics Tools: Create custom tools for specialized data analysis.

  • Industry-Specific Document Automation: Develop Copilots that understand the nuances of your industry’s documentation


Getting started with Microsoft Fabric's Copilot


STEP 1: The first step is to create a workspace in Microsoft Fabric. To do this, navigate to the left panel of your screen.


Here, you’ll find an option labeled “Workspace”. Click on this, and then click on “+ New Workspace”. This will initiate the process of creating a new workspace.


Microsoft Fabric Copilot 1


STEP 2: Once you’ve created a workspace, the next step is to navigate to the Data Science section. Here, you’ll find an option labeled “Notebook”.


Click on this to open a new notebook. This notebook will serve as your primary workspace for performing data analysis, exploration, and modeling.


Microsoft Fabric Copilot 2


STEP 3: After opening a new notebook, the next step is to assign a Lakehouse to it. Assigning a Lakehouse to your notebook will allow you to store, process, and analyze large volumes of data.


Microsoft Fabric Copilot 3


STEP 4: If you’ve set up the correct capacity, Microsoft Fabric’s Copilot will be automatically enabled within your workspace.



Chat with Microsoft Fabric's Copilot in the Chat Panel

The Copilot Chat Panel is an integral part of the Fabric notebook environment. It functions as an interactive AI assistant, designed to facilitate and enhance your coding experience.


Getting Started with Microsoft Fabric's Copilot


STEP 1: Locate the Copilot button at the top of your Notebook and click on it to open the Copilot chat panel.


Microsoft Fabric Copilot 4


STEP 2: Once you’ve clicked the Copilot button, you’ll notice that the Copilot chat panel appears on the right side of your notebook.


Microsoft Fabric Copilot 5

STEP 3: Upon opening the Copilot chat panel, an overview panel will also open. This panel contains useful information and links to help you get started with Copilot.


STEP 4: To begin interacting with Copilot, click on “Get Started”.


Sample Prompts Provided by Microsoft Fabric’s Copilot for Data Science

Once you’ve clicked “Get Started”, Copilot will provide you with some sample prompts to help you get started. Here are a few examples:

  1. Load data from my lakehouse into a DataFrame

  2. Generate Insights from data

  3. Suggest data visualizations


Microsoft Fabric Copilot for Data Science and Data Engineering

Key capabilities of Microsoft Fabric's Copilot for Data Science:

Microsoft Fabric’s Copilot for Data Science offers several key capabilities:

  • AI assistance: Generate code, query data, and get suggestions to accelerate your workflow.

  • Data insights: Quick data analysis and visualization capabilities.

  • Explanations: Copilot can provide natural language explanations of notebook cells, and can provide an overview for notebook activity as it runs.

  • Fixing errors: Copilot can also fix notebook run errors as they arise. Copilot shares context with the notebook cells (executed output) and can provide helpful suggestions.


Microsoft Fabric's Copilot Inside Notebook Cells (Chat Magics)

Chat-magics is a Python library seamlessly integrated into Microsoft Fabric notebooks. It allows you to execute specialized IPython magic commands directly within a notebook cell, providing real-time outputs. Think of it as having an AI co-pilot right in your notebook, ready to assist you with data-related tasks.


Activating Chat Magics

To activate Chat Magics, simply run the command %chat_magics in a cell. This command will display a help message and confirm that Chat Magics is operational and ready to assist you.


Capabilities of Chat-magics:

Chat Magics offers a variety of capabilities to enhance your data science workflow:


Instant Query and Code Generation:

Use the %%chat command to ask questions about your notebook’s state.


Microsoft Fabric Copilot for Data Science and Data Engineering 1


The %%code command enables code generation for data manipulation or visualization.


Microsoft Fabric Copilot for Data Science and Data Engineering 2


Dataframe Descriptions:

  • The %describe command provides summaries and descriptions of loaded dataframes.

  • This simplifies the data exploration phase by giving you quick insights into your data.


Commenting and Debugging:

  • The %%add_comments command lets you add comments to your code.

  • The %%fix_errors command helps identify and fix errors, improving code quality.


Privacy Controls:

  • Chat-magics offers granular privacy settings.

  • You can control what data is shared with the Azure OpenAI Service.

  • Commands like %set_sharing_level and %configure_privacy_settings provide this functionality.


Conclusion

Microsoft Fabric’s Copilot is a game-changer in the realm of data science and data engineering. Its ability to generate code, query data, provide natural language explanations, and fix errors makes it an indispensable tool for professionals in these fields. Whether you’re just starting or are a seasoned expert, Copilot can enhance your workflow and boost your productivity.

Comments


bottom of page