#NEWLINE# def read_csv_from_string( data ) : #NEWLINE# #INDENT# '\n    Reads a string in CSV format into a DataFrame. This function is similar to\n    :func:`pandas.read_csv` but it takes a string as input instead of a file.\n\n    This function is intended to be used in pyfora code that runs\n    remotely in a pyfora cluster.\n\n\n    Args:\n        data (str): a string of comma-separated values\n\n    Returns:\n        A :class:`pandas.DataFrame` that holds the parsed data.\n\n\n    Note:\n        This function currently assumes that all values are of type float (or floatifiable),\n        and that the first row contains column headers. This limitation will be\n        removed in the near future.\n    ' #NEWLINE# ( listOfColumns , columnNames ) = __inline_fora ( 'fun(@unnamed_args:(data), *args) {\n                   let df = try {\n                       parsing.csv(\n                           data.@m,\n                           defaultColumnType: { PyFloat(Float64(_)) }\n                           );\n                       } catch (e) {\n                       throw Exception(PyString(String(e)))\n                       }\n\n                   let listOfColumns = PyList(\n                       df.columns.apply(\n                           fun(series) {\n                               PyList(series.dataVec)\n                               }\n                           )\n                       );\n\n                  let columnNames = PyList(\n                      df.columnNames ~~ { PyString(_) }\n                      )\n\n                  return PyTuple((listOfColumns, columnNames))\n                  }' ) ( data ) #NEWLINE# return PurePandas . PurePythonDataFrame ( columnNames , columnNames )