invert4geom.randomly_sample_data#
- randomly_sample_data(seed, data_df, data_col, uncert_col)[source]#
Given a dataframe with a data column and an uncertainty column, sample the data with a normal distribution within the uncertainty range. Note that this overwrites the data column with the newly sampled data.
- Parameters:
seed (int) â random number generator seed
data_df (pandas.DataFrame) â dataframe with columns data_col and uncert_col
data_col (str) â name of data column to sample
uncert_col (str) â name of uncertainty column to sample within
- Returns:
dataframe with data column updated with sampled values
- Return type: