finds.utils.finder

Finder class to lookup reference info across multiple datasets

Copyright 2022, Terence Lim

MIT License

class finds.utils.finder.Finder(sql: SQL, identifier: str = '', table: str = '')[source]

Bases: object

Looks-up reference info across multiple datasets by various identifiers

__call__(label: str = '', identifier: str = '', table: str = '', **kwargs) DataFrame[source]

Lookup an identifier

Parameters:
  • label – Input label to lookup

  • identifier – Identifier type of input label

  • table – Physical name of table to query

  • kwargs – Alternate method to specify identifier=label

Notes:

Guesses identifier type and table if not specified or initialized

Examples:

>>> find('ALPHABET', 'comnam')
>>> find('ALPHABET', 'conm')
>>> find('ALPHABET', 'cname')
>>> find(18144)
>>> find(328795, 'gvkey')
>>> find('0011', 'ticker', 'idsum')
>>> find('aapl')
>>> find('03783310')
>>> find('03783310','cusip', 'links')
>>> find('03783310','cusip', 'idsum')
>>> find('45483', 'permco', 'names')