omfpandas.blockmodel.blockmodel_to_df

omfpandas.blockmodel.blockmodel_to_df(blockmodel, variables=None, query=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.

Returns:

The DataFrame representing the BlockModel.

Return type:

pd.DataFrame