...
Table of Contents | ||
---|---|---|
|
pytd.pandas_td.connect
pytd.pandas_td.connect
(apikey=None, endpoint=None, **kwargs)[source]
...
Returns
Return type
pytd.Client
pytd.pandas_td.create_engine
pytd.pandas_td.create_engine
(url, con=None, header=True, show_progress=5.0, clear_progress=True)[source]
...
date_format (str, default: None) – Format string for datetime objects
writer (str, {‘bulk_import’, ‘insert_into’, ‘spark’}, or
pytd.writer.Writer
, default: ‘bulk_import’) – A Writer to choose writing method to Treasure Data. If not given or string value, a temporal Writer instance will be created.fmt (str, {'csv', 'msgpack'}, default: 'csv') –
Format for bulk_import.
csv
Convert dataframe to temporary CSV file. Stable option but slower than msgpack option because pytd saves dataframe as temporary CSV file, then td-client converts it to msgpack. Types of columns are guessed by
pandas.read_csv
and it causes unintended type conversion e.g., 0-padded string"00012"
into integer12
.msgpack
Convert to temporary msgpack.gz file. Fast option but there is a slight difference on type conversion compared to csv.
IPython Magics
Use IPython magics to access to Treasure Data. Start by loading the magics.
|
---|
pytd.pandas_td.ipyhton.MagicContext