Session#
from tmlt.analytics import Session
- class tmlt.analytics.Session(accountant, public_sources)#
Bases:
object
Allows differentially private query evaluation on sensitive data.
Sessions should not be directly constructed. Instead, they should be created using
from_dataframe()
or with aBuilder
.A simple introduction to Session initialization and use can be found in the first and second tutorials.
Attributes
Returns the IDs of the private sources. |
|
Returns a dictionary of public source DataFrames. |
|
Returns the IDs of the public sources. |
|
Returns the remaining privacy_budget left in the session. |
Methods
Adds a public data source to the session. |
|
Creates a new view from a transformation and possibly cache it. |
|
Deletes a view and decaches it if it was cached. |
|
Describes this session, or one of its tables, or the result of a query. |
|
Answers a query within the given privacy budget and returns a Spark dataframe. |
|
Initializes a DP session from a Spark dataframe. |
|
Returns the column types for any data source. |
|
Returns an optional column that must be grouped by in this query. |
|
Returns the ID column of a table, if it has one. |
|
Returns the ID space of a table, if it has one. |
|
Returns the schema for any data source. |
|
Returns new sessions from a partition mapped to split name/ |
|
Closes out this Session, allowing other Sessions to become active. |