code: def time_series_rdd_from_observations(dt_index, df, ts_col, key_col, val_col):
      
      jvm = df._sc._jvm
      jtsrdd = jvm.com.cloudera.sparkts.api.java.JavaTimeSeriesRDDFactory.timeSeriesRDDFromObservations( \
        dt_index._jdt_index, df._jdf, ts_col, key_col, val_col)
      return TimeSeriesRDD(None, None, jtsrdd, df._sc)
docs: Instantiates a TimeSeriesRDD from a DataFrame of observations.
  
      An observation is a row containing a timestamp, a string key, and float value.
  
      Parameters
      ----------
      dt_index : DateTimeIndex
          The index of the RDD to create. Observations not contained in this index will be ignored.
      df : DataFrame
      ts_col : string
          The name of the column in the DataFrame containing the timestamps.
      key_col : string
          The name of the column in the DataFrame containing the keys.
      val_col : string
          The name of the column in the DataFrame containing the values.