Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method for getting a specific column's info in Python #5655

Open
rbasralian opened this issue Jun 24, 2024 · 3 comments
Open

Method for getting a specific column's info in Python #5655

rbasralian opened this issue Jun 24, 2024 · 3 comments
Assignees
Labels

Comments

@rbasralian
Copy link
Contributor

In Python we no equivalent to .getDefinition().getColumn("MyColumn") in Java, so it's a pain if you have a question like "what is the data type of MyColumn?" or "Is MyColumn a partitioning column?"

There should be a .get_column(col_name: str) or something similar

@devinrsmith
Copy link
Member

pydoc on https://deephaven.io/core/pydoc/code/deephaven.table.html#deephaven.table.Table.columns seems lacking. IMO, if we were re-writing .columns, I think it would be better exposed as a dict. As it stands today, we might want a different value? .dict_columns["Foo"]?

@rbasralian
Copy link
Contributor Author

That sound reasonable to me. I would slightly prefer columns_dict over dict_columns because that would be more in line with the Java method names:

public List<ColumnDefinition<?>> getColumns()
public Map<String, ColumnDefinition<?>> getColumnNameMap()

@jmao-denver jmao-denver self-assigned this Jun 24, 2024
@devinrsmith
Copy link
Member

#5892 is poc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants