From f972ac69ca71de9dd355831955587513aff3a702 Mon Sep 17 00:00:00 2001 From: Chuck McCallum Date: Fri, 18 Oct 2024 11:05:57 -0400 Subject: [PATCH] prelude idiom --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8168004..d6c291a 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,17 @@ Deserialize a JSON string into a Transformation/Measurement by invoking `opendp_ ### Example ```python >>> from opendp_logger import enable_logging, make_load_json ->>> from opendp.mod import enable_features +>>> import opendp.prelude as dp >>> enable_logging() ->>> enable_features("contrib") - ->>> import opendp.transformations as trans +>>> dp.enable_features("contrib") >>> preprocessor = ( ... # load data into a dataframe where columns are of type Vec -... trans.make_split_dataframe(separator=",", col_names=["hello", "world"]) +... dp.t.make_split_dataframe(separator=",", col_names=["hello", "world"]) ... >> ... # select a column of the dataframe -... trans.make_select_column(key="income", TOA=str) +... dp.t.make_select_column(key="income", TOA=str) ... ) >>> # serialize the chain to json