财报勾稽
原能力
按期间、币种、会计口径核对报表及关键余额,登记差异和待补资料。(细化版 p.14–15)
首选项目
EdgarTools(MIT)。 EdgarTools
匹配范围
读取 XBRL 与表项,跨列检查核结构化勾稽。
源码
EdgarTools · def xbrl(
edgar/_filings.py · 1874–1887 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def xbrl(self) -> Optional[XBRL]:
"""
Get the XBRL document for the filing, parsed and as a FilingXbrl object
:return: The parsed XBRL, or `None` when the filing carries no XBRL
attachments — a property of the filing, not a failure to read it,
and one this keeps answering quietly in 6.0 (docs/upgrade/6.0.md).
"""
# The `except XBRLFilingWithNoXbrlData` that used to sit here was dead:
# nothing in the library raised that error, and `from_filing` signals
# the no-XBRL case by returning None. Removed rather than left as
# decoration, so this function's None has one visible source.
try:
return XBRL.from_filing(self)
EdgarTools · def income_statement(
edgar/financials.py · 249–262 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def income_statement(self, *, view: ViewType = None):
"""
Get the income statement.
Args:
view: StatementView controlling dimensional data display.
STANDARD: Face presentation matching SEC Viewer (display default)
DETAILED: All dimensional data included (to_dataframe default)
SUMMARY: Non-dimensional totals only
Returns:
A Statement object for the income statement, or None if not available
"""
if self.xb is None:
Pandera · class Check(
pandera/api/checks.py · 18–31 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class Check(BaseCheck):
"""Check a data object for certain properties."""
def __init__(
self,
check_fn: Callable,
groups: Union[str, list[Hashable]] | None = None,
groupby: Union[str, list[str], Callable] | None = None,
ignore_na: bool = True,
element_wise: bool = False,
native: bool = True,
name: str | None = None,
error: str | None = None,
raise_warning: bool = False,
实现与验收要点
覆盖未上市材料、会计口径与固化勾稽规则。