We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was thinking that it could be useful to mention what happens when trying to access a DataFrame column that does not exist.
DataFrame
The docs mention that DataFrame implements Access:
Access
Explorer.DataFrame also implements the Access behaviour (also known as the brackets syntax).
When using the bracket access syntax, an error is raised rather than returning nil, as the Access docs mention:
nil
Both return nil if the key does not exist
Here is what happens:
df = DataFrame.new( a: [1, 2, 3], b: [10, 20, 30] ) df["c"] ** (ArgumentError) could not find column name "c". The available columns are: ["a", "b"]. If you are attempting to interpolate a value, use ^c.
I was thinking an example like this in the DataFrame docs could be helpful. If this would be welcome, I could open a PR request for review.
(For more context, this is related to a question I asked on the Elixir Forum.)
The text was updated successfully, but these errors were encountered:
Please send a PR adding clarifications to our docs on Access, we can work on it together :)
Sorry, something went wrong.
Add access example to DataFrame docs (elixir-explorer#1001)
6d21715
Add an example showing what happens when trying to access a data frame column that does not exist.
Add access example to DataFrame docs (#1001) (#1004)
6e40319
No branches or pull requests
I was thinking that it could be useful to mention what happens when trying to access a
DataFrame
column that does not exist.The docs mention that
DataFrame
implementsAccess
:When using the bracket access syntax, an error is raised rather than returning
nil
, as theAccess
docs mention:Here is what happens:
I was thinking an example like this in the
DataFrame
docs could be helpful. If this would be welcome, I could open a PR request for review.(For more context, this is related to a question I asked on the Elixir Forum.)
The text was updated successfully, but these errors were encountered: