Files
HowToSD-ComfyUI-Data-Analysis/docs/reference/pandas_loc_row_multiindex_dataframe.md
T

27 lines
936 B
Markdown

# Pandas Loc Row MultiIndex DataFrame
Selects a row or rows from a pandas DataFrame with MultiIndex and output as a DataFrame.
Specify comma-separated MultiIndex labels (row index) and the data type for the MultiIndex to select a row.
Below screenshots illustrate these options:
![PandasLocRowMultiIndexDataFrame](../images/multiindex.png)
The top DataFrame has an integer-type MultiIndex, while the bottom DataFrame has a string-type MultiIndex. In both cases, two index values are specified to select a single row while the correct MultiIndex data type is also selected. Note that mixed data types for MultiIndex are not currently supported.
## Input
| Name | Data type |
|---|---|
| dataframe | DataFrame |
| row_index | String |
| row_index_type | |
## Output
| Data type |
|---|
| DataFrame |
<HR>
Category: Data subset selection
ComfyUI Data Analysis Node Reference. © 2025 Hide Inada (HowToSD.com). All rights reserved.