chainalysis.utils package - Data Solutions Python SDK 1.1.0 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# chainalysis.utils package

## Module contents

class chainalysis.utils.Utils

  Bases: `object`

  This class contains util/helper functions for users of the SDK.

  property stringify: Stringify

    Call the stringify property to access the Stringify class.

class chainalysis.utils.Stringify

  Bases: `object`

  This class contains functions to transform python objects into formatted string params so they can be used to query Data Solutions’ databases without needing to be transformed manually by the user.

  lists(data: Series | list) → str

    Convert a list or pandas Series to a formatted string param.

    Parameters:

      data (Union[Series, list]) – The list to be converted.

    Returns:

      The converted list.

    Return type:

      str

  columns(columns: list) → str

    Convert a column select list to a formatted string param.

    Parameters:

      columns (list) – The column select list object to be converted.

    Returns:

      The converted column select list.

    Return type:

      str

  datetimes(_datetime: datetime) → str

    Convert a datetime object to a formatted string param.

    Parameters:

      list (list) – The datetime object to be converted.

    Returns:

      The converted datetime object.

    Return type:

      str

  dataframes(df: DataFrame) → str

    Convert a pandas DataFrame to a SQL CTE

    Parameters:

      df (DataFrame) – The DataFrame to be converted.

    Returns:

      The converted DataFrame.

    Return type:

      str