Reference cells
Reference cells from Python.
Referencing tables (and named outputs)
# Note: uses same table reference style as Formulas
# References entire table, including headers
df = q.cells("Table1[#ALL]")
# Reads the values in Table1 and places them into variable df
# Note: this only retrieves the values, not the column names/headers
df_values = q.cells("Table1")
# Get a single column out of table into DataFrame
# Note: this only retrieves the column's data, not the header
df_column = q.cells("Table1[column_name]")
# Creates an empty DataFrame with just the headers as column names of the table referenced
df_headers = q.cells("Table1[#HEADERS]")
# Reference a range of columns from a table
df_columns = q.cells("Table1[[Column 1:Column 3]]")Referencing individual cells
Referencing a range of cells
Referencing another sheet
Unbounded references
Unbounded column references
Unbounded row references
Relative vs absolute references
Last updated
Was this helpful?