AzureML DataPrep Native Extensions

42.1.0 · active · verified Mon Apr 13

This package provides the underlying native extensions for Azure Machine Learning's Data Preparation capabilities. It is typically consumed as a dependency by higher-level AzureML SDK components like `azureml-dataprep` or `azureml.core`, rather than being directly imported by end-users. The current version is 42.1.0, and its release cadence is tied to the broader AzureML SDK.

Warnings

Install

Imports

Quickstart

Demonstrates that `azureml-dataprep-native` is an underlying dependency for `azureml-dataprep`. The quickstart shows how to use `azureml-dataprep` to perform a basic data read operation, implicitly leveraging the native extensions provided by this package. Users typically do not directly import or interact with `azureml-dataprep-native`.

# Install azureml-dataprep-native to make its native components available.
# Users typically interact with the higher-level azureml.dataprep or
# azureml.core.Dataset APIs, which leverage this package internally.
# No direct user-facing imports are typically made from azureml-dataprep-native.
# To use data prep functionality, install azureml-dataprep:
# pip install azureml-dataprep

# Example of how functionality (implicitly powered by this library) is accessed:
import pandas as pd
from azureml.dataprep import read_csv, Dataflow
import os

# Create a dummy CSV file
csv_content = "id,name\n1,Alice\n2,Bob\n3,Charlie"
with open("sample.csv", "w") as f:
    f.write(csv_content)

# Read data using azureml.dataprep (which uses azureml-dataprep-native internally)
# This code will only run if azureml-dataprep is also installed.
# To run this code, ensure you have: pip install azureml-dataprep
try:
    dataflow: Dataflow = read_csv("sample.csv")
    print("Dataflow created successfully (backed by azureml-dataprep-native).")
    # Further operations would typically follow, e.g., dataflow.to_pandas_dataframe()
    # For demonstration, let's just show the schema
    print(dataflow.get_profile().schema_summary)
except ImportError:
    print("azureml-dataprep not installed. Please install it to use data prep features:")
    print("pip install azureml-dataprep")
except Exception as e:
    print(f"An error occurred during data prep operation: {e}")
finally:
    # Clean up the dummy file
    if os.path.exists("sample.csv"):
        os.remove("sample.csv")

print("\nazureml-dataprep-native is primarily an underlying dependency.")

view raw JSON →