Pandas

value_counts_df(df_in, col_in)[source]

Returns pd.value_counts() as a DataFrame

Parameters:
  • df_in – Dataframe on which to run value_counts(), must have column col.

  • col_in – Name of column in df for which to generate counts

Returns:

Returned dataframe will have two columns, one named “count” which contains the count_values() for each unique value of df[col]. The other column will be named col.

add_molecule_and_errors(df_in, smiles_col='SMILES', mol_col_name='ROMol', error_col_name='Error')[source]

Add a molecule column and another column with associated errors to a Pandas dataframe

Parameters:
  • df_in – input dataframe

  • smiles_col – name for the input SMILES column

  • mol_col_name – name for the output molecule column

  • error_col_name – name for the output errors column

Returns:

None