class_docstr: Note: the Gantt charts listed here are inspired by
  Dustin Arendt and Svitlana Volkova. ESTEEM: A Novel Framework for Qualitatively Evaluating and
  Visualizing Spatiotemporal Embeddings in Social Media. ACL System Demonstrations. 2017.
  http://www.aclweb.org/anthology/P/P17/P17-4005.pdf
  
  In order to use the make chart function, Altair must be installed.
class_docstr_tok: ["Note",":","the","Gantt","charts","listed","here","are","inspired","by","Dustin","Arendt","and","Svitlana","Volkova",".","ESTEEM",":","A","Novel","Framework","for","Qualitatively","Evaluating","and","Visualizing","Spatiotemporal","Embeddings","in","Social","Media",".","ACL","System","Demonstrations",".","2017.","http",":","\/\/www.aclweb.org\/anthology\/P\/P17\/P17-4005.pdf","In","order","to","use","the","make","chart","function",",","Altair","must","be","installed","."]
docstr: Returns
  -------
docstr_tok: ["Returns","--","--","--","-"]
code: def get_task_df(self):
      """
      Returns
      -------
  
      """
      term_time_df = self._get_term_time_df()
      terms_to_include = (
          term_time_df.groupby("term")["top"]
          .sum()
          .sort_values(ascending=False)
          .iloc[: self.num_terms_to_include]
          .index
      )
      task_df = (
          term_time_df[term_time_df.term.isin(terms_to_include)][
              ["time", "term"]
          ]
          .groupby("term")
          .apply(lambda x: pd.Series(self._find_sequences(x["time"])))
          .reset_index()
          .rename({0: "sequence"}, axis=1)
          .reset_index()
          .assign(start=lambda x: x["sequence"].apply(lambda x: x[0]))
          .assign(end=lambda x: x["sequence"].apply(lambda x: x[1]))[
              ["term", "start", "end"]
          ]
      )
      return task_df
  
file_path: scattertext/scattertext/diachronic/GanttChart.py
imports: import numpy
  import pandas
  from scattertext.termranking import AbsoluteFrequencyRanker
  from scattertext.termscoring.RankDifference import RankDifference
label_desc: Use image node_id 6 for calling the GanttChart obj's underlying member method code with example usage: obj.get_task_df() and returns: task_df