dlpy.timeseries.TimeseriesTable.from_serverfile¶
-
classmethod
TimeseriesTable.
from_serverfile
(conn, path, columns=None, caslib=None, importoptions=None, casout=None)¶ Create an TimeseriesTable from a file on the server side
Parameters: - conn : CAS
The CAS connection object
- path : string
The path that the server can access. If the caslib is specified, it is relative path to the file with respect to the caslib. otherwise, it is the full path to the file.
- 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 include no column, which will generate empty data.
Default: None- caslib : string, optional
The name of the caslib which contains the file to be uploaded.
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_serverfile(s, "path/to/file.csv", casout=dict(name='time_tbl', replace=True))