Shared functions and methods¶
Custom Exceptions¶
Error¶
IdaDataBaseError¶
IdaDataFrameError¶
PrimaryKeyError¶
IdaKMeansError¶
IdaAssociationRulesError¶
User Interactions¶
Configuring the environment¶
Performance Monitoring¶
User prompt¶
Legagy from benchmark¶
-
ibmdbpy.utils.
silent
(function)[source]¶ Decorate that silent the function it decorates, i.e SQL queries will not be printed.
Notes
- Legagy from Benchmark submodule
-
ibmdbpy.utils.
to_nK
(dataframe, nKrow)[source]¶ Create a version of the dataframe that has n Krows.
Parameters: dataframe : DataFrame
DataFrame to use as a basis
nKrow : int
Number of Krows the return dataframe should contain
Returns: DataFrame
A Version of the inputed dataframe with n Krows
Notes
- If the dataset is smaller than nKrow, it will be imputed randomly
with some existing rows, otherwise ve return a random sample
- Legagy from Benchmark submodule
Convention checking¶
Name checking¶
-
ibmdbpy.utils.
check_tablename
(tablename)[source]¶ Check if a string is upper case. This function converts the string to upper case and checks if it is a valid table name.
Parameters: tablename : str
string to be checked.
Returns: str
Checked and upper cased table name.
Notes
Table names should consist of upper case characters or numbers that can be separated by underscores (“_”) characters.
Private functions¶
_convert_dtypes¶
-
ibmdbpy.utils.
_convert_dtypes
(idadf, data)[source]¶ DEPRECATED - CURRENTLY NOT IN USE was used for formatting dataframe types
Convert datatypes in a dataframe to float or to int according to the corresponding type in database. This function only works if the dataframe that is given as a parameter has the same columns as the current IdaDataFrame.