docstr: Select data from the submission table and return it as a pandas DataFrame.
  
  Args:
      query (ast.Select): The SQL query to be executed.
  
  Returns:
      pandas.DataFrame: A pandas DataFrame containing the selected data.
docstr_tok: ["Select","data","from","the","submission","table","and","return","it","as","a","pandas","DataFrame",".","Args",":","query","(","ast.Select",")",":","The","SQL","query","to","be","executed",".","Returns",":","pandas.DataFrame",":","A","pandas","DataFrame","containing","the","selected","data","."]
code: def select(self, query: ast.Select) -> pd.DataFrame:
      """Select data from the submission table and return it as a pandas DataFrame.
  
      Args:
          query (ast.Select): The SQL query to be executed.
  
      Returns:
          pandas.DataFrame: A pandas DataFrame containing the selected data.
      """
  
      reddit = self.handler.connect()
  
      subreddit_name = None
      sort_type = None
      conditions = extract_comparison_conditions(query.where)
      for condition in conditions:
          if condition[0] == "=" and condition[1] == "subreddit":
              subreddit_name = condition[2]
          elif condition[0] == "=" and condition[1] == "sort_type":
              sort_type = condition[2]
          elif condition[0] == "=" and condition[1] == "items":
              items = int(condition[2])
  
      if not sort_type:
          sort_type = "hot"
      if not subreddit_name:
          return pd.DataFrame()
  
      if sort_type == "new":
          submissions = reddit.subreddit(subreddit_name).new(
              limit=items
          )
      elif sort_type == "rising":
          submissions = reddit.subreddit(subreddit_name).rising(
              limit=items
          )
      elif sort_type == "controversial":
          submissions = reddit.subreddit(subreddit_name).controversial(
              limit=items
          )
      elif sort_type == "top":
          submissions = reddit.subreddit(subreddit_name).top(
              limit=items
          )
      else:
          submissions = reddit.subreddit(subreddit_name).hot(
              limit=items
          )
  
      result = []
      for submission in submissions:
          data = {
              "id": submission.id,
              "title": submission.title,
              "author": submission.author.name
              if submission.author
              else None,
              "created_utc": submission.created_utc,
              "score": submission.score,
              "num_comments": submission.num_comments,
              "permalink": submission.permalink,
              "url": submission.url,
              "ups": submission.ups,
              "downs": submission.downs,
              "num_crossposts": submission.num_crossposts,
              "subreddit": submission.subreddit.display_name,
              "selftext": submission.selftext,
          }
          result.append(data)
  
      result = pd.DataFrame(result)
      self.filter_columns(result, query)
      return result
  
file_path: mindsdb/mindsdb/integrations/handlers/reddit_handler/reddit_tables.py
imports: import pandas
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
label_desc: Use image node_id 1 for calling the SubmissionTable obj's underlying member method code with example usage: obj.select(query) and returns: result, pd