Skip to content

Commit

Permalink
Replace .dataframe with .to_polars() in builder examples (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andilun authored Aug 30, 2023
1 parent 852d595 commit 4c9b67b
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions tests/builder_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"result = (\n",
" PseudoData.from_pandas(df).on_field(\"fnr\").pseudonymize()\n",
")\n",
"result.dataframe.head()"
"result.to_polars().head()"
]
},
{
Expand All @@ -77,7 +77,7 @@
" .map_to_stable_id()\n",
" .pseudonymize()\n",
")\n",
"result.dataframe.head()"
"result.to_polars().head()"
]
},
{
Expand All @@ -102,7 +102,7 @@
" .on_field(\"fnr\")\n",
" .pseudonymize(preserve_formatting=True)\n",
")\n",
"result.dataframe.head()"
"result.to_polars().head()"
]
},
{
Expand All @@ -127,7 +127,7 @@
" .on_fields(\"fornavn\", \"etternavn\", \"fodselsdato\")\n",
" .pseudonymize()\n",
")\n",
"result.dataframe.head()"
"result.to_polars().head()"
]
},
{
Expand Down Expand Up @@ -155,31 +155,23 @@
" .pseudonymize()\n",
")\n",
"result = (\n",
" PseudoData.from_pandas(result.dataframe)\n",
" PseudoData.from_pandas(result.to_polars())\n",
" .on_fields(\"fornavn\", \"etternavn\", \"fodselsdato\")\n",
" .pseudonymize()\n",
")\n",
"result.dataframe.head()"
"result.to_polars().head()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "dapla-toolbelt-pseudo-s0-eGPKC-py3.10",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"name": "ipython"
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"nbconvert_exporter": "python"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 4c9b67b

Please sign in to comment.