omfpandas.blockmodel.df_to_blockmodel

omfpandas.blockmodel.df_to_blockmodel(df, blockmodel_name, is_tensor=True)[source]

Write a DataFrame to a BlockModel.

Parameters:
  • df (pd.DataFrame) – The DataFrame to convert to a BlockModel.

  • blockmodel_name (str) – The name of the BlockModel.

  • is_tensor (bool) – If True, a TensorGridBlockModel will be created. If False, a RegularBlockModel will be

  • created.

Returns:

The BlockModel representing the DataFrame.

Return type:

BlockModel