dataframe 模組

DataFrame CRUD 操作命名空間用於 Dataverse SDK。

類別

DataFrameOperations

pandas DataFrame CRUD 操作的命名空間。

透過 client.dataframe 存取。 提供以 DataFrame 為導向的封裝器,包覆記錄層級的 CRUD 操作。

範例:


   import pandas as pd

   client = DataverseClient(base_url, credential)

   # Query records as a DataFrame
   df = client.dataframe.get("account", select=["name"], top=100)

   # Create records from a DataFrame
   new_df = pd.DataFrame([{"name": "Contoso"}, {"name": "Fabrikam"}])
   new_df["accountid"] = client.dataframe.create("account", new_df)

   # Update records
   new_df["telephone1"] = ["555-0100", "555-0200"]
   client.dataframe.update("account", new_df, id_column="accountid")

   # Delete records
   client.dataframe.delete("account", new_df["accountid"])