You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何为Python中tia.bbg的LocalTerminal参考数据请求添加覆盖参数?

How to Add Override Parameters to BDP Requests in tia.bbg

Hey there! I get that you're looking to replicate your Excel BDP function (with that BEST_FPERIOD_OVERRIDE parameter) in Python using the tia.bbg library. Let's break this down simply.

In your Excel formula:

=BDP("IBM US Equity","BEST_EBITDA","BEST_FPERIOD_OVERRIDE","1FY")

The last two arguments are the override field and its value. In tia.bbg's LocalTerminal.get_reference_data() method, you can pass these overrides using the overrides parameter, which accepts a dictionary of field-value pairs.

Here's the adjusted Python code that matches your Excel function exactly:

from tia.bbg import LocalTerminal

# Set up your override as a key-value pair in a dictionary
overrides = {"BEST_FPERIOD_OVERRIDE": "1FY"}

# Include the overrides parameter in your request
resp = LocalTerminal.get_reference_data("IBM US Equity", "BEST_EBITDA", overrides=overrides)

# To view the results, you can convert the response to a DataFrame
print(resp.as_frame())

A quick note: If you ever need to add multiple overrides later, just expand the dictionary with additional key-value pairs, like:

overrides = {
    "BEST_FPERIOD_OVERRIDE": "1FY",
    "ANOTHER_OVERRIDE_FIELD": "DESIRED_VALUE"
}

This should give you the same result as your original Excel BDP call.

内容的提问来源于stack exchange,提问作者jason

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:08:01