schrodinger.project.pandasutils module¶
A module which contains functions to convert between Schrodinger project data and a Pandas data frame.
- class schrodinger.project.pandasutils.WhichRows(value)¶
Bases:
enum.Enum
An enumeration.
- SELECTED = 1¶
- ALL = 2¶
- class schrodinger.project.pandasutils.WhichColumns(value)¶
Bases:
enum.Enum
An enumeration.
- VISIBLE = 1¶
- ALL = 2¶
- schrodinger.project.pandasutils.use_pandas_utils()¶
Importing PandasTools has several side-effects. This context manager resets these side effects after use.
- schrodinger.project.pandasutils.get_data_frame_from_project(pt: schrodinger.project.project.Project, which_rows: schrodinger.project.pandasutils.WhichRows = WhichRows.ALL, which_columns: schrodinger.project.pandasutils.WhichColumns = WhichColumns.ALL, prop_filter: Optional[str] = None, with_rdkit: bool = False, with_smiles: bool = False) pandas.core.frame.DataFrame ¶
Return a Pandas frame given a Schrodinger project object (as might be returned from maestro.get_project_table()
- Parameters
pt – Project (already open via Maestro or standalone) to convert
which_rows – Which rows from the project are to be converted (all or selected)
which_columns – Which columns from the project are to be converted
prop_filter – A regular expression which, if defined, will restrict the properties to datanames which match this expression
with_rdkit – A flag which indicates if RdKit MOL objects should be added. Globally modifies the way RDKit mols are represented
- Returns
A Pandas dataframe populated with data from the project
Note: Calling this function with
with_rdkit
set toTrue
will globally modify the way RDKit mols are represented as strings. If you want to restore the default string rendering callPandasUtils.UninstallPandasTools()