A colleague registered version 3 of an MLTable data asset named green-quickstart in your Azure Machine Learning workspace. In a notebook, you have already created an authenticated MLClient named ml_client and imported the mltable package.
You must:
- retrieve version 3 of the existing data asset without changing it
- apply the data loading steps saved in the asset
- get the full result as a Pandas data frame named
dffor analysis
Complete the Python code.
VERSION = "3"
data_asset = ml_client.data.get(name="green-quickstart", version=VERSION)
tbl = mltable.load(f"azureml:/{data_asset.id}")
df = tbl.()- Blank 1: to_pandas_dataframe (correct answer)
to_pandas_dataframe materializes the table as a Pandas data frame, as required. show displays a preview, as illustrated by tbl.show(5), rather than producing the full data frame. save writes the loading definition to an MLTable file rather than producing a data frame.
After an MLTable is registered as a data asset, team members can use its friendly name in a notebook. They retrieve the asset with ml_client.data.get for a specific name and version. mltable.load with the azureml:/ asset ID then reproduces the saved loading steps. Finally, to_pandas_dataframe() loads the data into a Pandas data frame.