A component to display Pandas DataFrames.

Fields

NameTypeDescriptionOptions
DataTextMust be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.
    Show indexTextShows the dataframe’s index. If an Arrow table is used, shows the zero-based integer index.
    1. yes
    2. no
    Enable searchText
    1. yes
    2. no
    Enable downloadTextAllows the user to download the data as CSV.
    1. yes
    2. no
    Use MarkdownTextIf active, the output will be sanitized; unsafe elements will be removed.
    1. yes
    2. no
    Display row countNumberSpecifies how many rows to show simultaneously.
      Wrap textTextNot wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.
      1. yes
      2. no
      Primary textColor
        Secondary textColor
          SeparatorColor
            BackgroundColor
              Font styleText
              1. normal
              2. monospace
              Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.

                Low code usage

                This component can be declared directly in Python, using backend-driven UI.

                ui.DataFrame(content={
                        "dataframe": "", # str 
                        "showIndex": "yes", # str [yes, no]
                        "enableSearch": "no", # str [yes, no]
                        "enableDownload": "no", # str [yes, no]
                        "useMarkdown": "no", # str [yes, no]
                        "displayRowCount": 0.0, # Union[float, str] 
                        "wrapText": "no", # str [yes, no]
                        "primaryTextColor": "", # str 
                        "secondaryTextColor": "", # str 
                        "separatorColor": "", # str 
                        "dataframeBackgroundColor": "", # str 
                        "fontStyle": "normal", # str [normal, monospace]
                        "cssClasses": "", # str 
                    }
                )
                

                Reference