Stream: helpdesk (published)

Topic: ✔ How to autocomplete columns of Tables.jl table?


view this post on Zulip Júlio Hoffimann (May 24 2023 at 19:25):

Whenever we are working with a DataFrame we can type df.foo and press TAB to autocomplete the column name. How to mimic this behavior with other Tables.jl types? We already implemented getproperty, the only part that is not working is the autocompletion of the column name.

view this post on Zulip Sebastian Pfitzner (May 24 2023 at 20:06):

help?> propertynames
search: propertynames

  propertynames(x, private=false)

  Get a tuple or a vector of the properties (x.property) of an object x. This is typically the same as
  fieldnames(typeof(x)), but types that overload getproperty should generally overload propertynames as well to get
  the properties of an instance of the type.

  propertynames(x) may return only "public" property names that are part of the documented interface of x. If you want
  it to also return "private" fieldnames intended for internal use, pass true for the optional second argument. REPL
  tab completion on x. shows only the private=false properties.

  See also: hasproperty, hasfield.

view this post on Zulip Notification Bot (May 25 2023 at 14:45):

Júlio Hoffimann has marked this topic as resolved.


Last updated: Oct 02 2023 at 04:34 UTC