calcbench / python_api_client Goto Github PK
View Code? Open in Web Editor NEWA Python client for Calcbench's API.
A Python client for Calcbench's API.
Sphinx is not building the correct documentation for the last two functions.
ticker, metric, CIK etc can be categories
I am attempting to run the following line cb.companies(SIC_codes=[1100], entire_universe=True, NAICS_codes=[213112], include_most_recent_filing_dates=False)
and getting this error
/usr/local/lib/python3.6/dist-packages/calcbench/companies.py in companies(SIC_codes, index, company_identifiers, entire_universe, include_most_recent_filing_dates, NAICS_codes)
77 companies = pd.DataFrame(companies)
78 for column in ["first_filing", "most_recent_filing", "most_recent_full_year_end"]:
---> 79 companies[column] = pd.to_datetime(companies[column], errors="coerce")
80 return companies
81
/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py in __getitem__(self, key)
2904 if self.columns.nlevels > 1:
2905 return self._getitem_multilevel(key)
-> 2906 indexer = self.columns.get_loc(key)
2907 if is_integer(indexer):
2908 indexer = [indexer]
/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2898 return self._engine.get_loc(casted_key)
2899 except KeyError as err:
-> 2900 raise KeyError(key) from err
2901
2902 if tolerance is not None:
KeyError: 'first_filing'
This does not work consistently.
filings = cb.filings(update_date=today)
for f in filings:
print(f.get_standardized_data())
Hi,
This is the example straight from the documentation and same result when I tried the "disclosure_nlp.ipynb" notebook:
import calcbench as cb
data = cb.disclosure_dataframe(
company_identifiers=["msft", "goog"],
all_history=True,
disclosure_names=["ManagementsDiscussionAndAnalysis", "RiskFactors"])
UnboundLocalError: local variable 'quarter' referenced before assignment
If the credentials are incorrect you should not save them to the keychain
When running the following example (https://github.com/calcbench/notebooks/blob/master/python_client_api_demo.ipynb), there is an exception from standardized_data
function
TypeError Traceback (most recent call last)
<ipython-input-44-ecfcb69ac1de> in <module>()
4 year=2020,
5 period=1,
----> 6 accesion_id=None
7 )
/usr/local/lib/python3.6/dist-packages/calcbench/standardized_numeric.py in normalized_dataframe(company_identifiers, metrics, start_year, start_period, end_year, end_period, entire_universe, point_in_time, year, period, all_history, period_type, trace_hyperlinks, use_fiscal_period, company_identifier_scheme, accesion_id)
TypeError: normalized_raw() got an unexpected keyword argument 'accesion_id'
Should be able to pass more than one year/period
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.