dlpy.timeseries.TimeseriesTable.from_localfile¶
-
classmethod
TimeseriesTable.
from_localfile
(conn, path, columns=None, importoptions=None, casout=None)¶ Create an TimeseriesTable from a file on the client side.
Parameters: - conn : CAS
The CAS connection object
- path : string
The full path to the local file that will be uploaded to the server.
- columns : list-of-strings, optional
Columns to keep when loading the data. None means it will include all the columns from the source. Empty list means to include no column, which will generate empty data.
Default: None- importoptions : dict, optional
Options to import data and upload to the server, such as filetype, delimiter, etc. None means use the default ‘auto’ method in the importoptions from CAS.upload.
Default: None- casout : dict or CASTable, optional
If it is dict, it specifies the output CASTable parameters. If it is CASTable, it is the CASTable that will be overwritten. None means a new CASTable with random name will be generated.
Default: None
Returns: Examples
>>> from swat import CAS >>> from dlpy.timeseries import TimeseriesTable >>> s=CAS("cloud.example.com", 5570) >>> time_tbl = TimeseriesTable.from_localfile(s, "path/to/file.csv", casout=dict(name='time_tbl', replace=True))