Skip to main content

Utility functions for BAAR developers

Project description

This Custom Library is specifically created for the developers/useres who use BAAR. Which is a product of Allied Media Inc. (www.alliedmedia.com)

Author:

Souvik Roy	[sroy-2019]
Zhaoyu (Thomas) Xu	[xuzhaoyu]

Dependencies:

pandas==1.0.3 or above numpy==1.18.4 or above

Additional Info:

The string structure that follows is a streamline structure that the developers/users follow throughout an automation workflow designed in BAAR:
"Column_1__=__abc__$$__Column_2__=__def__::__Column_1__=__hello__$$__Column_2__=__world"


Available functions and the examples are listed below:
  1. read_convert(string), Output Data Type: list of dictionary Attributes: i. string: Input String, Data Type = String Input: "Column_1__=abc$$Column_2=def::Column_1=hello$$Column_2=__world" Output: [{"Column_1":"abc", "Column_2":"def"}, {"Column_1":"hello", "Column_2":"world"}]

  2. write_convert(input_list), Output Data Type: string Attributes: i. input_list: List that contains the Dictionaries of Data, Data Type = List Input: [{"Column_1":"abc", "Column_2":"def"}, {"Column_1":"hello", "Column_2":"world"}] Output: "Column_1__=abc$$Column_2=def::Column_1=hello$$Column_2=__world"

  3. string_to_df(string, rename_cols, drop_dupes), Output Data Type: pandas DataFrame Attributes: i. string: Input String, Data Type = String ii. rename_cols: Dictionary that contains old column names and new column names mapping, Data Type = Dictionary, Default Value = {} iii.drop_dupes: Drop duplicate rows from the final dataframe, Data Type = Bool, Default Value = False Input: "Column_1__=abc$$Column_2=def::Column_1=hello$$Column_2=__world" Output: | Column_1 | Column_2


0 | abc | def 1 | hello | world

  1. df_to_string(input_df, rename_cols, drop_dupes), Output Data Type: string Attributes: i. input_df: Input DataFrame, Data Type = pandas DataFrame ii. rename_cols: Dictionary that contains old column names and new column names mapping, Data Type = Dictionary, Default Value = {} iii.drop_dupes: Drop duplicate rows from the final dataframe, Data Type = Bool, Default Value = False Input: | Column_1 | Column_2

0 | abc | def 1 | hello | world Output: "Column_1__=abc$$Column_2=def::Column_1=hello$$Column_2=__world"

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

baarutil-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

baarutil-1.0.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file baarutil-1.0.0.tar.gz.

File metadata

  • Download URL: baarutil-1.0.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for baarutil-1.0.0.tar.gz
Algorithm Hash digest
SHA256 54c83eb1f7e4a269ce2fa87497929272afd38d115816ceea33e52e012c3630f3
MD5 6572360344e8b85be8f739946b5d4be9
BLAKE2b-256 26d1d3f453165a43709d7f881ac682894e93ffc74739e4756d37020c15c9d860

See more details on using hashes here.

File details

Details for the file baarutil-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: baarutil-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for baarutil-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2088d8dda4e69b22ff8dfeb765cfeb5e8da74be6f99d0fd2a06861dd122ead2
MD5 5af812f6a46000da4f4f5402b7076c03
BLAKE2b-256 1183c59e9c4a8d82c8ba6408f4978d4a11d7a5dff6257cf01fe294d21ade2fd2

See more details on using hashes here.

Supported by

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