imod.formats.ipf.write_assoc(path, df, itype=1, nodata=1e+20, assoc_columns=None)[source]#

Writes a single IPF associated (TXT) file.

  • path (pathlib.Path or str) – Path for the written associated file.

  • df (pandas.DataFrame) – DataFrame containing the data to write.

  • itype (int or str) –

    IPF type. Possible values, either integer or string:

    1 : “timeseries” 2 : “borehole1d” 3 : “cpt” 4 : “borehole3d”

  • nodata (float) – The value given to nodata values. These are generally NaN (Not-a-Number) in pandas, but this leads to errors in iMOD(FLOW) for IDFs. Defaults to value of 1.0e20 instead.

  • assoc_columns (optional, list or dict) – Columns to store in the associated file. In case of a dictionary, the columns will be renamed according to the mapping in the dictionary. Defaults to None.


Writes a file.

Return type: