Way to retrieve value of properties in `pipe`
See original GitHub issueTo execute a method of an object, I can do something like:
# Executes the `describe` method of `mtcars`
mtcars >> pipe(_.describe())
However, when I want to retrieve a property of an object, this does not work:
# Want to get `mtcars.columns`
mtcars >> pipe(_.columns)
█─'__call__'
├─█─.
│ ├─_
│ └─'columns'
└─ mpg cyl disp hp drat wt qsec vs am gear carb
0 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4
1 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4
2 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1
[...]
The closest I could get was:
mtcars >> pipe(lambda _: _.columns)
Index(['mpg', 'cyl', 'disp', 'hp', 'drat', 'wt', 'qsec', 'vs', 'am', 'gear',
'carb'],
dtype='object')
But it would be really cool to retrieve properties directly from the Symbolic
instance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to extract a property from an observable using a pipe
I'm trying to store an OrderState object in my ngrx store. The problem I have is extracting data from this to my UI....
Read more >Getting all the Properties of a selected Pipe in Plant3d using ...
Getting all the Properties of a selected Pipe in Plant3d using C#.NET ; CommandMethod · "GetPipingProperties")] ; Editor ed = AcadApp.
Read more >How to use PowerShell Objects and Data Piping - Varonis
The following will extract each line of the input file and transform it via the pscustomobject command into a property name (as required...
Read more >Transforming Data Using Pipes - Angular
Implement the PipeTransform interface in your custom pipe class to perform the transformation. Angular invokes the transform method with the value of a...
Read more >How to Use PowerShell Where-Object to Filter All the Things
In PowerShell, you'll find a few different containment operators: -contains / -ccontains – Filter a collection containing a property value. - ...
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
Hey–thanks for raising. I get bit by this pretty regularly, and its a quick fix! I opened a PR, and will merge later today 😃.
(Will take a closer look at your comments on piping issues. It feels like a few pipe changes would go a long way.)
Sorry for the wait–should be available in v0.0.25!