parameters: (markupsNode)
return_statement: return dataframe
docstring: Convert markups node content to pandas dataframe.
  
    Markups content is copied. Therefore, changes in markups node do not affect the dataframe,
    and dataframe changes do not affect the original markups node.
docstring_summary: Convert markups node content to pandas dataframe.
docstring_tokens: Convert markups node content to pandas dataframe .
function: def dataframeFromMarkups(markupsNode):
    """Convert markups node content to pandas dataframe.
  
    Markups content is copied. Therefore, changes in markups node do not affect the dataframe,
    and dataframe changes do not affect the original markups node.
    """
    try:
      # Suppress "lzma compression not available" UserWarning when loading pandas
      import warnings
      with warnings.catch_warnings():
        warnings.simplefilter(action='ignore', category=UserWarning)
        import pandas as pd
    except ImportError:
      raise ImportError("Failed to convert to pandas dataframe. Please install pandas by running `slicer.util.pip_install('pandas')`")
  
    label = []
    description = []
    positionWorldR = []
    positionWorldA = []
    positionWorldS = []
    selected = []
    visible = []
  
    numberOfControlPoints = markupsNode.GetNumberOfControlPoints()
    for controlPointIndex in range(numberOfControlPoints):
      label.append(markupsNode.GetNthControlPointLabel(controlPointIndex))
      description.append(markupsNode.GetNthControlPointDescription(controlPointIndex))
      p=[0,0,0]
      markupsNode.GetNthControlPointPositionWorld(controlPointIndex, p)
      positionWorldR.append(p[0])
      positionWorldA.append(p[1])
      positionWorldS.append(p[2])
      selected.append(markupsNode.GetNthControlPointSelected(controlPointIndex) != 0)
      visible.append(markupsNode.GetNthControlPointVisibility(controlPointIndex) != 0)
  
    dataframe = pd.DataFrame({
      'label': label,
      'position.R': positionWorldR,
      'position.A': positionWorldA,
      'position.S': positionWorldS,
      'selected': selected,
      'visible': visible,
      'description': description})
    return dataframe
function_tokens: def dataframeFromMarkups ( markupsNode ) : try : # Suppress "lzma compression not available" UserWarning when loading pandas import warnings with warnings . catch_warnings ( ) : warnings . simplefilter ( action = 'ignore' , category = UserWarning ) import pandas as pd except ImportError : raise ImportError ( "Failed to convert to pandas dataframe. Please install pandas by running `slicer.util.pip_install('pandas')`" ) label = [ ] description = [ ] positionWorldR = [ ] positionWorldA = [ ] positionWorldS = [ ] selected = [ ] visible = [ ] numberOfControlPoints = markupsNode . GetNumberOfControlPoints ( ) for controlPointIndex in range ( numberOfControlPoints ) : label . append ( markupsNode . GetNthControlPointLabel ( controlPointIndex ) ) description . append ( markupsNode . GetNthControlPointDescription ( controlPointIndex ) ) p = [ 0 , 0 , 0 ] markupsNode . GetNthControlPointPositionWorld ( controlPointIndex , p ) positionWorldR . append ( p [ 0 ] ) positionWorldA . append ( p [ 1 ] ) positionWorldS . append ( p [ 2 ] ) selected . append ( markupsNode . GetNthControlPointSelected ( controlPointIndex ) != 0 ) visible . append ( markupsNode . GetNthControlPointVisibility ( controlPointIndex ) != 0 ) dataframe = pd . DataFrame ( { 'label' : label , 'position.R' : positionWorldR , 'position.A' : positionWorldA , 'position.S' : positionWorldS , 'selected' : selected , 'visible' : visible , 'description' : description } ) return dataframe