omfpandas.blockmodel.blockmodel_to_df

omfpandas.blockmodel.blockmodel_to_df(blockmodel, variables=None, query=None, index_filter=None)[source]

Convert block model to a DataFrame.

Parameters:
  • blockmodel (BlockModel) – The BlockModel to convert.

  • variables (Optional[list[str]]) – The variables to include in the DataFrame. If None, all variables are included.

  • query (Optional[str]) – The query to filter the DataFrame.

  • index_filter (Optional[list[int]]) – List of integer indices to filter the DataFrame.

Returns:

The DataFrame representing the BlockModel.

Return type:

pd.DataFrame