The get_pricing
method will return either a pandas series, dataframe, or panel depending upon the number of assets and fields. With a single asset and a single field, it returns a series. With either multiple assets or fields, it will return a dataframe. With both multiple assets and multiple fields , it returns a panel. Referencing specific values is a bit different for each case.
Since the request was how to reference the column ['Equity(34103 [VTA])'], I'll assume the get_pricing
method was called with multiple assets and a single data field. Something like this
my_assets = symbols(['VTA', 'IBM', 'AAPL'])
output = get_pricing(my_assets, fields=['price', 'volume'])
In this case,'output' will be a dataframe with an index of dates and three columns, one for each asset. The column labels are the assets. The labels are not strings but asset objects. This causes confusion at times. Therefore, to reference a specific column one simply needs to reference the asset. Something like this to get the column for VTA above
# Both these approaches yield a series with just the VTA column
# First get the VTA object
vta = symbols('VTA')
vta_series = output[vta]
vta_series = output.loc[vta]
These will slice the dataframe and return a series. If one wants to keep the dataframe 'as is' but just have the VTA column, then use the filter
method. One can also provide a list of columns if desired.
# This approach keeps the dataframe but just the desired column(s)
vta = symbols('VTA')
vta_series = output.filter([vta])
The key is to use the asset object as the label and not a string. Hope that helps.