title: Save function outputs (including pandas DataFrame) to workspace in Python
body: <p>Created a function in Python with filepath string as input. Function returns a list and a dataframe. How to call the function properly in order to save the dataframe to workspace?
  Code works perfectly without the function but I need the output for further caluclations.
  I want to save the whole dataframe, not just parts of it. Haven't found any online solution, it's just too plain simple I guess. Thanks in advance!</p>
  
  <p><strong>FUNCTION:</strong></p>
  
  <pre><code>def import_r_data(filepath):
  
      r('load("{}")'.format(filepath))
      tmp_obj = r['tmp.obj']
      data = build_py_from_ro(tmp_obj)
      dataframe = data['test1']['test2']
  
      column_list = list(dataframe)
      return column_list
      return dataframe
  </code></pre>
  
  <p><strong>CALL FUNCTION:</strong> (error occurs here, dataframe output (left side) is set incorrectly)</p>
  
  <pre><code>column_list, dataframe = import_r_data('filepathstring')
  </code></pre>
  
  <p><strong>ERROR:</strong></p>
  
  <pre><code>ValueError: too many values to unpack (expected 2)
  </code></pre>
  
  <p><strong>EDIT: SOLUTION (thanks to ayhan and DeepSpace):</strong></p>
  
  <pre><code>return column_list, dataframe
  </code></pre>