Skip to main content

Useful crystal-ball-related stuff.

Project description

Crystal-Ball Documentation

If you have hundreds of csvs you need to quickly digest and understand, you can use crystal-ball to help with the onboarding and data exploration phase of your project. You will be able to immediately dive into an expansive data set without getting lost.

Crystal-Ball Features:

  • find specific columns and tables you may be interested in, but may have otherwise not known where to look.
  • walk through connections between different csvs,
  • compare and establish foreign key and primary key relationships by using simple boxplots
  • dynamically create a master table of useful information while simultaneously recording your step-by-step process for future reference.

Methods

cb.contains(keywords, all_colnames) -> list

Purpose:

  • Determine whether a keyword (substring) exists in a given list of column names (strings).
  • Note: This search is case sensitive!

Parameters:

  • keywords (list of strings)
    • A key word
  • all_colnames (list of strings)
    • List of column names of a table, or for many tables.
    • If no argument is provided, this function will use the column names generated when the run method was called.

Returns:

  • list (a list of bools):
    • For each index corresponding to a keyword, True if substring exists in list of strings, otherwise False.

Examples:

colnames = ['id', 'name', 'title']
cb.contains(['name'], colnames) # returns [True]
cb.contains(['Name'], colnames) # returns [False]
cb.contains(['name', 'Name'], colnames) # returns [True, False]

cb.featureSearch(keywords, all_colnames) -> list

Purpose:

  • Find features (column names) that contain the substrings specified in keywords.
  • Note: This search is case sensitive!

Parameters:

  • keywords (list of strings)
    • List of key words that the user is interested in
  • colnames (list of strings)
    • List of column names of a table, or for many tables.
    • If no argument is provided, this function will use the column names generated when the run method was called.

Returns:

  • list (list of features):
    • List will contain all features (column names) that contains one/all substrings found in keywords.
    • List will be sorted in alphabetical order.

Examples:

colnames = ['id', 'name', 'nameType', 'subSpeciesName', 'title']
cb.featureSearch(['name'], colnames) # returns ['name', 'nameType']
cb.featureSearch(['Name'], colnames) # returns ['subSpeciesName']
cb.featureSearch(['name', 'Name'], colnames) # returns ['name', 'nameType', 'subSpeciesName']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crystal-ball-0.1.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

crystal_ball-0.1.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page