docstr: Initialize tsdataset(s) from path of parquet file.
  
  :param path: A string path to parquet file. The string could be a URL.
         Valid URL schemes include hdfs, http, ftp, s3, gs, and file. For file URLs, a host
         is expected. A local file could be: file://localhost/path/to/table.parquet.
         A file URL can also be a path to a directory that contains multiple partitioned
         parquet files.
  :param dt_col: a str indicates the col name of datetime
         column in the input data frame.
  :param target_col: a str or list indicates the col name of target column
         in the input data frame.
  :param id_col: (optional) a str indicates the col name of dataframe id. If
         it is not explicitly stated, then the data is interpreted as only
         containing a single id.
  :param extra_feature_col: (optional) a str or list indicates the col name
         of extra feature columns that needs to predict the target column.
  :param with_split: (optional) bool, states if we need to split the dataframe
         to train, validation and test set. The value defaults to False.
  :param val_ratio: (optional) float, validation ratio. Only effective when
         with_split is set to True. The value defaults to 0.
  :param test_ratio: (optional) float, test ratio. Only effective when with_split
         is set to True. The value defaults to 0.1.
  :param largest_look_back: (optional) int, the largest length to look back.
         Only effective when with_split is set to True. The value defaults to 0.
  :param largest_horizon: (optional) int, the largest num of steps to look
         forward. Only effective when with_split is set to True. The value defaults
         to 1.
  :param kwargs: Any additional kwargs are passed to the pd.read_parquet
         and pyarrow.parquet.read_table.
  
  :return: a TSDataset instance when with_split is set to False,
           three TSDataset instances when with_split is set to True.
  
  Create a tsdataset instance by:
  
  >>> # Here is a df example:
  >>> # id        datetime      value   "extra feature 1"   "extra feature 2"
  >>> # 00        2019-01-01    1.9     1                   2
  >>> # 01        2019-01-01    2.3     0                   9
  >>> # 00        2019-01-02    2.4     3                   4
  >>> # 01        2019-01-02    2.6     0                   2
  >>> tsdataset = TSDataset.from_parquet("hdfs://path/to/table.parquet", dt_col="datetime",
  >>>                                   target_col="value", id_col="id",
  >>>                                   extra_feature_col=["extra feature 1",
  >>>                                                      "extra feature 2"])
docstr_tok: ["Initialize","tsdataset","(","s",")","from","path","of","parquet","file",".",":","param","path",":","A","string","path","to","parquet","file",".","The","string","could","be","a","URL",".","Valid","URL","schemes","include","hdfs",",","http",",","ftp",",","s3",",","gs",",","and","file",".","For","file","URLs",",","a","host","is","expected",".","A","local","file","could","be",":","file",":","\/\/localhost\/path\/to\/table.parquet",".","A","file","URL","can","also","be","a","path","to","a","directory","that","contains","multiple","partitioned","parquet","files",".",":","param","dt_col",":","a","str","indicates","the","col","name","of","datetime","column","in","the","input","data","frame",".",":","param","target_col",":","a","str","or","list","indicates","the","col","name","of","target","column","in","the","input","data","frame",".",":","param","id_col",":","(","optional",")","a","str","indicates","the","col","name","of","dataframe","id",".","If","it","is","not","explicitly","stated",",","then","the","data","is","interpreted","as","only","containing","a","single","id",".",":","param","extra_feature_col",":","(","optional",")","a","str","or","list","indicates","the","col","name","of","extra","feature","columns","that","needs","to","predict","the","target","column",".",":","param","with_split",":","(","optional",")","bool",",","states","if","we","need","to","split","the","dataframe","to","train",",","validation","and","test","set",".","The","value","defaults","to","False",".",":","param","val_ratio",":","(","optional",")","float",",","validation","ratio",".","Only","effective","when","with_split","is","set","to","True",".","The","value","defaults","to","0.",":","param","test_ratio",":","(","optional",")","float",",","test","ratio",".","Only","effective","when","with_split","is","set","to","True",".","The","value","defaults","to","0.1.",":","param","largest_look_back",":","(","optional",")","int",",","the","largest","length","to","look","back",".","Only","effective","when","with_split","is","set","to","True",".","The","value","defaults","to","0.",":","param","largest_horizon",":","(","optional",")","int",",","the","largest","num","of","steps","to","look","forward",".","Only","effective","when","with_split","is","set","to","True",".","The","value","defaults","to","1.",":","param","kwargs",":","Any","additional","kwargs","are","passed","to","the","pd.read_parquet","and","pyarrow.parquet.read_table",".",":","return",":","a","TSDataset","instance","when","with_split","is","set","to","False",",","three","TSDataset","instances","when","with_split","is","set","to","True",".","Create","a","tsdataset","instance","by",":",">",">",">","#","Here","is","a","df","example",":",">",">",">","#","id","datetime","value","``","extra","feature","1","''","``","extra","feature","2","''",">",">",">","#","00","2019-01-01","1.9","1","2",">",">",">","#","01","2019-01-01","2.3","0","9",">",">",">","#","00","2019-01-02","2.4","3","4",">",">",">","#","01","2019-01-02","2.6","0","2",">",">",">","tsdataset","=","TSDataset.from_parquet","(","``","hdfs",":","\/\/path\/to\/table.parquet","''",",","dt_col=","''","datetime","''",",",">",">",">","target_col=","''","value","''",",","id_col=","''","id","''",",",">",">",">","extra_feature_col=","[","``","extra","feature","1","''",",",">",">",">","``","extra","feature","2","''","]",")"]
code: def from_parquet(
      path,
      dt_col,
      target_col,
      id_col=None,
      extra_feature_col=None,
      with_split=False,
      val_ratio=0,
      test_ratio=0.1,
      largest_look_back=0,
      largest_horizon=1,
      **kwargs,
  ):
      """
      Initialize tsdataset(s) from path of parquet file.
  
      :param path: A string path to parquet file. The string could be a URL.
             Valid URL schemes include hdfs, http, ftp, s3, gs, and file. For file URLs, a host
             is expected. A local file could be: file://localhost/path/to/table.parquet.
             A file URL can also be a path to a directory that contains multiple partitioned
             parquet files.
      :param dt_col: a str indicates the col name of datetime
             column in the input data frame.
      :param target_col: a str or list indicates the col name of target column
             in the input data frame.
      :param id_col: (optional) a str indicates the col name of dataframe id. If
             it is not explicitly stated, then the data is interpreted as only
             containing a single id.
      :param extra_feature_col: (optional) a str or list indicates the col name
             of extra feature columns that needs to predict the target column.
      :param with_split: (optional) bool, states if we need to split the dataframe
             to train, validation and test set. The value defaults to False.
      :param val_ratio: (optional) float, validation ratio. Only effective when
             with_split is set to True. The value defaults to 0.
      :param test_ratio: (optional) float, test ratio. Only effective when with_split
             is set to True. The value defaults to 0.1.
      :param largest_look_back: (optional) int, the largest length to look back.
             Only effective when with_split is set to True. The value defaults to 0.
      :param largest_horizon: (optional) int, the largest num of steps to look
             forward. Only effective when with_split is set to True. The value defaults
             to 1.
      :param kwargs: Any additional kwargs are passed to the pd.read_parquet
             and pyarrow.parquet.read_table.
  
      :return: a TSDataset instance when with_split is set to False,
               three TSDataset instances when with_split is set to True.
  
      Create a tsdataset instance by:
  
      >>> # Here is a df example:
      >>> # id        datetime      value   "extra feature 1"   "extra feature 2"
      >>> # 00        2019-01-01    1.9     1                   2
      >>> # 01        2019-01-01    2.3     0                   9
      >>> # 00        2019-01-02    2.4     3                   4
      >>> # 01        2019-01-02    2.6     0                   2
      >>> tsdataset = TSDataset.from_parquet("hdfs://path/to/table.parquet", dt_col="datetime",
      >>>                                   target_col="value", id_col="id",
      >>>                                   extra_feature_col=["extra feature 1",
      >>>                                                      "extra feature 2"])
      """
      from zoo.chronos.data.utils.file import parquet2pd
  
      columns = (
          _to_list(dt_col, name="dt_col")
          + _to_list(target_col, name="target_col")
          + _to_list(id_col, name="id_col")
          + _to_list(extra_feature_col, name="extra_feature_col")
      )
      df = parquet2pd(path, columns=columns, **kwargs)
      return TSDataset.from_pandas(
          df,
          dt_col=dt_col,
          target_col=target_col,
          id_col=id_col,
          extra_feature_col=extra_feature_col,
          with_split=with_split,
          val_ratio=val_ratio,
          test_ratio=test_ratio,
          largest_look_back=largest_look_back,
          largest_horizon=largest_horizon,
      )
  
imports: import pandas
  import numpy
  import functools
  from zoo.chronos.data.utils.feature import generate_dt_features, generate_global_features
  from zoo.chronos.data.utils.impute import impute_timeseries_dataframe
  from zoo.chronos.data.utils.deduplicate import deduplicate_timeseries_dataframe
  from zoo.chronos.data.utils.roll import roll_timeseries_dataframe
  from zoo.chronos.data.utils.scale import unscale_timeseries_numpy
  from zoo.chronos.data.utils.resample import resample_timeseries_dataframe
  from zoo.chronos.data.utils.split import split_timeseries_dataframe
  from zoo.chronos.data.utils.utils import _to_list, _check_type, _check_col_within, _check_col_no_na, _check_is_aligned, _check_dt_is_sorted
  from tsfresh.utilities.dataframe_functions import roll_time_series
  from tsfresh.utilities.dataframe_functions import impute
  from tsfresh import extract_features
  from tsfresh.feature_extraction import ComprehensiveFCParameters, MinimalFCParameters, EfficientFCParameters
label_desc: Use image node_id 3 for calling the TSDataset obj's underlying member method code with example usage: obj.from_parquet(path, dt_col, target_col, id_col, extra_feature_col, with_split, val_ratio, test_ratio, largest_look_back, largest_horizon) and returns: TSDataset