[API] Should encode() overwrite or update?
See original GitHub issueConsider this:
layer = Layer(data)
layer.encode(x='Horsepower')
layer.encode(y='Miles_per_Gallon')
Currently, this result is identical to
Layer(data).encode(y='Miles_per_Gallon')
this is because every time encode
is called, it overwrites the current encoding.
I think it might be less confusing to change encode
so that it instead updates the encoding, such that the above would be equivalent to
layer = Layer(data).encode(
x='Horsepower',
y='Miles_per_Gallon'
)
Thoughts?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
What's the best way to overwrite a file using fs in node.js
Found the solution. fs.writeFileSync gets a third arguments for options that can be an object. So if you get the "File already exist"...
Read more >Use a mapping template to override an API's request and ...
Learn how to override a an API's request and response parameters and status codes.
Read more >Files: update | Drive API - Google Developers
Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating...
Read more >Azure API Management transformation policies | Microsoft Learn
Reference for the transformation policies available for use in Azure API Management. Provides policy usage, settings, and examples.
Read more >PATCH - HTTP - MDN Web Docs
The HTTP PATCH request method applies partial modifications to a resource. ... then a PUT will naturally overwrite it (since it overwrites ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think if someone is iterating on a single Layer during exploration, it is very likely they will want to re-encode a single channel. Because of this, we shouldn’t warn upon re-encoding a channel.
closed by #103