Session.add_public_dataframe#
from tmlt.analytics import Session
- Session.add_public_dataframe(source_id, dataframe)#
Adds a public data source to the session.
Not all Spark column types are supported in public sources; see
ColumnType
for information about which types are supported.Example
>>> public_spark_data.toPandas() A C 0 0 0 1 0 1 2 1 1 3 1 2 >>> # Add public data >>> sess.add_public_dataframe( ... source_id="my_public_data", dataframe=public_spark_data ... ) >>> sess.public_sources ['my_public_data'] >>> sess.get_column_types("my_public_data") {'A': ColumnType.VARCHAR, 'C': ColumnType.INTEGER}